[chromium] Clipping/Transforms applied in wrong order in opaque paint tracking
The clip is applied in device coordinates, before transforming the painted rect into device coordinates. This makes any translations get doubly represented, and gives incorrect paint tracking results.
Created attachment 127301 [details] Patch
Comment on attachment 127301 [details] Patch Attachment 127301 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11534680 New failing tests: compositing/scrollbar-painting.html compositing/overflow/clip-content-under-overflow-controls.html
(I edited the scrollbar-painting.html test to remove the body margin/padding for easier numbers.) === Before this change, we see the draw in the bottom left corner as: diddraw 85.000000 85.000000 15.000000x15.000000 The device clip is 0,0 15x15. So the draw is ignored for opaque tracking as it assumes it is not drawn at all. === After this change, we see it as: diddraw 85.000000 85.000000 15.000000x15.000000 canvasTransform 0.000000 0.000000 15.000000x15.000000 1 clipped 0.000000 0.000000 15.000000x15.000000 1 targetTransform 0.000000 0.000000 15.000000x15.000000 1 opaque 1 ie. The transform puts us at 0,0 where the clip is applied, and the opaque paint can be used now for opaque tracking (and turning off blending). Making this our lovely off-by-1 friend again. === The paint in question here is #0 WebCore::OpaqueRegionSkia::markRectAsOpaque (this=0x7fffde4523a0, rect=...) at ../../third_party/WebKit/Source/WebCore/platform/graphics/skia/OpaqueRegionSkia.cpp:293 #1 0x00007fffedcea9a2 in WebCore::OpaqueRegionSkia::didDraw (this=0x7fffde4523a0, context=0x7fffde452370, transform=..., rect=..., paint=..., drawsOpaque=true, fillsBounds=true) at ../../third_party/WebKit/Source/WebCore/platform/graphics/skia/OpaqueRegionSkia.cpp:271 #2 0x00007fffedcea1d8 in WebCore::OpaqueRegionSkia::didDrawRect (this=0x7fffde4523a0, context=0x7fffde452370, transform=..., fillRect=..., paint=..., bitmap=0x0) at ../../third_party/WebKit/Source/WebCore/platform/graphics/skia/OpaqueRegionSkia.cpp:169 #3 0x00007fffedcee2f6 in WebCore::PlatformContextSkia::didDrawRect (this=0x7fffde452370, rect=..., paint=..., bitmap=0x0) at ../../third_party/WebKit/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp:611 #4 0x00007fffedce1f37 in WebCore::GraphicsContext::fillRect (this=0x7fffdd8cdaa0, rect=..., color=..., colorSpace=WebCore::ColorSpaceDeviceRGB) at ../../third_party/WebKit/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:865 #5 0x00007fffed5f0f48 in WebCore::RenderLayer::paintScrollCorner (this=0x7fffe03a2438, context=0x7fffdd8cdaa0, paintOffset=..., damageRect=...) at ../../third_party/WebKit/Source/WebCore/rendering/RenderLayer.cpp:2496 Which is: context->fillRect(absRect, Color::white, box->style()->colorSpace()); With absRect = {85, 85, 15x15}. Clearly an opaque paint. === I will include new linux baselines in this CL.
Created attachment 127407 [details] Patch Includes new baselines for the off-by-1 fails. I suspect the mac platform baselines can go away after this.
Comment on attachment 127407 [details] Patch OK. r=me
Comment on attachment 127407 [details] Patch Clearing flags on attachment: 127407 Committed r107988: <http://trac.webkit.org/changeset/107988>
All reviewed patches have been landed. Closing bug.