Bug 235462

Summary: Add pixel tolerance to some compositing tests
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Tools / TestsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 231828    
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2022-01-21 16:39:28 PST
Add pixel tolerance to some compositing tests
Comment 1 Simon Fraser (smfr) 2022-01-21 16:40:29 PST
Created attachment 449710 [details]
Patch
Comment 2 Darin Adler 2022-01-23 11:10:03 PST
Comment on attachment 449710 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=449710&action=review

rs=me with a small set of clarifying questions

> LayoutTests/ChangeLog:8
> +        Add pixel tolerance to tests whose output is slightly different when accelerated drawing

What’s the rationale here? How much pixel tolerance is too much? Are there some tests where adding pixel tolerance would be a bad idea? Is it a good practice to add pixel tolerance needed only on iOS simulator with accelerated drawing as a cross platform parameter? Is this a forever good decision, or would we want to return and lower the tolerance later?
Comment 3 Simon Fraser (smfr) 2022-01-24 09:03:09 PST
(In reply to Darin Adler from comment #2)
> Comment on attachment 449710 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=449710&action=review
> 
> rs=me with a small set of clarifying questions
> 
> > LayoutTests/ChangeLog:8
> > +        Add pixel tolerance to tests whose output is slightly different when accelerated drawing
> 
> What’s the rationale here? How much pixel tolerance is too much? Are there
> some tests where adding pixel tolerance would be a bad idea? Is it a good
> practice to add pixel tolerance needed only on iOS simulator with
> accelerated drawing as a cross platform parameter? Is this a forever good
> decision, or would we want to return and lower the tolerance later?

The numbers are based on the pixel tolerance results from a run with iOS accelerated drawing enabled (bug 231828). I only add tolerance to tests where the image failure is obviously the result of differences in rendering implementation (e.g. antialiasing fuzz) and not some real failure.

Currently we don't have a way to express per-platform tolerance. I expect some future version of this feature will move the tolerance data outside of the test file (see the webkit-dev discussion from 2021-11).
Comment 4 EWS 2022-01-24 09:37:27 PST
Committed r288449 (246338@main): <https://commits.webkit.org/246338@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449710 [details].
Comment 5 Radar WebKit Bug Importer 2022-01-24 09:38:20 PST
<rdar://problem/87974349>