Qt implementation of GraphicsContext::clipToImageBuffer calls internally ImageBuffer::clip. ImageBuffer::clip creates a alphaMask and push it in TransparencyLayer. However if GraphicsContext does a scale transformation the alphaMask is not scaled.
Created attachment 98963 [details] Patch Proposed patch.
Comment on attachment 98963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98963&action=review > Source/WebCore/ChangeLog:10 > + No new tests. (OOPS!) Oops indeed! The commit-queue will choke on this line, replace it with one of these three: 1) Tests: list of tests that exercise this change... 2) No new tests because... 3) Awkward silence. > Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp:167 > + QRectF deviceClip = context->platformContext()->transform().mapRect(floatRect); > + if (alphaMask.width() != deviceClip.width() || alphaMask.height() != deviceClip.height()) > + alphaMask = alphaMask.scaled(deviceClip.width(), deviceClip.height()); We should do this in GraphicsContext::pushTransparencyLayerInternal() instead, then we avoid doing mapRect() twice, and ImageBuffer doesn't need to know about any painter transforms.
Created attachment 99082 [details] Patch Proposed patch. Update ChangeLog and move scale complexity to GraphicsContext::pushTransparencyLayerInternal.
The commit-queue encountered the following flaky tests while processing attachment 99082 [details]: http/tests/media/video-cancel-load.html bug 56797 (authors: annacc@chromium.org, eric.carlson@apple.com, jamesr@chromium.org, and vrk@chromium.org) The commit-queue is continuing to process your patch.
Comment on attachment 99082 [details] Patch Clearing flags on attachment: 99082 Committed r90020: <http://trac.webkit.org/changeset/90020>
All reviewed patches have been landed. Closing bug.