Bug 85483

Summary: [cairo] Pixel artifacts can be seen on reflections
Product: WebKit Reporter: Thiago Marcos P. Santos <tmpsantos>
Component: WebKit EFLAssignee: Dominik Röttsches (drott) <d-r>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, d-r, gustavo, gyuyoung.kim, hausmann, lucas.de.marchi, mrobinson, rakuco, reed, senorblanco, vestbo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Current buggy rendering result
none
Patch
none
Archive of layout-test-results from ec2-cr-linux-02
none
Patch none

Description Thiago Marcos P. Santos 2012-05-03 05:38:54 PDT
Created attachment 139991 [details]
Current buggy rendering result

Makes fast/css/transformed-mask.html fails.
Comment 1 Dominik Röttsches (drott) 2012-05-31 07:43:54 PDT
Created attachment 145090 [details]
Patch
Comment 2 Dominik Röttsches (drott) 2012-05-31 07:47:54 PDT
Would this be a sensible approach? What are the antialiasing semantics of the simple rectangular clip function when used while a transformation is applied to the layer? 

Inferring from the other implementations (Qt, Skia) I believe it shouldn't antialias - does anyone know more details?

I am CC'ing some people who have worked on this - thanks for your help in this matter.
Comment 3 Mike Reed 2012-05-31 08:47:44 PDT
my 2 cents:

I think skia doesn't antialias rect-clips for legacy and perceived performance reasons, not as an explicit feature. In the past skia didn't support aa clipping at all, but now it does, so perhaps we should revisit this question for skia as well.
Comment 4 Dominik Röttsches (drott) 2012-05-31 13:16:11 PDT
Thanks Mike - that would fit my assumption that the GraphicsContext WebKit interface would for legacy reasons also not assume the rectangular clip function to be antialiased. Can someone confirm that?
Comment 5 Martin Robinson 2012-05-31 13:22:00 PDT
Comment on attachment 145090 [details]
Patch

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

Nice catch! Do you mind regenerating pixel results for GTK+ to more easily verify this change?

> Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:529
> +    cairo_antialias_t savedAntialiasRule = cairo_get_antialias(cr);
> +    cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);

It's probably worth dropping a comment here explaining why you are doing this.
Comment 6 WebKit Review Bot 2012-05-31 15:15:56 PDT
Comment on attachment 145090 [details]
Patch

Attachment 145090 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12872241

New failing tests:
http/tests/media/media-source/video-media-source-event-attributes.html
Comment 7 WebKit Review Bot 2012-05-31 15:16:01 PDT
Created attachment 145166 [details]
Archive of layout-test-results from ec2-cr-linux-02

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-02  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 8 Dominik Röttsches (drott) 2012-06-01 04:09:16 PDT
Created attachment 145266 [details]
Patch
Comment 9 Dominik Röttsches (drott) 2012-06-01 04:11:03 PDT
Thanks for taking a look, Martin.

(In reply to comment #5)
> (From update of attachment 145090 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=145090&action=review
> 
> Nice catch! Do you mind regenerating pixel results for GTK+ to more easily verify this change?

Sure - rebaselined for EFL and GTK.

> > Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:529
> > +    cairo_antialias_t savedAntialiasRule = cairo_get_antialias(cr);
> > +    cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
> 
> It's probably worth dropping a comment here explaining why you are doing this.

Done.

I believe the Chromium EWS bot failure is a flaky test - let's hope it goes throught his time.
Comment 10 WebKit Review Bot 2012-06-01 09:20:00 PDT
Comment on attachment 145266 [details]
Patch

Clearing flags on attachment: 145266

Committed r119242: <http://trac.webkit.org/changeset/119242>
Comment 11 WebKit Review Bot 2012-06-01 09:20:06 PDT
All reviewed patches have been landed.  Closing bug.