DescriptionMerge 114791 - [chromium] Clip TransparencyWin to prevent OOM from large Skia canvas
https://bugs.webkit.org/show_bug.cgi?id=84289
Reviewed by James Robinson.
Source/WebCore:
TransparencyWin will create a Skia canvas of whatever size is passed
in, even if the result will ultimately be clipped. Handle the clip
implicitly and try (in some cases) to create a smaller canvas. This
can happen due to RenderBox::paintBoxDecorations passing a paint rect
down of the entire element's size.
Modes with more complicated transforms (ScaleTransform, UnTransform)
are not handled yet.
Tests: TransparencyWin.ClippedKeepTransformNoLayer
TransparencyWin.ClippedKeepTransformOpaqueCompositeLayer
TransparencyWin.ClippedKeepTransformOpaqueWhiteLayer
* platform/graphics/chromium/TransparencyWin.cpp:
(WebCore::TransparencyWin::computeLayerSize):
Source/WebKit/chromium:
Add a test that would OOM if the layer wasn't clipped. Also, verify
that clipping the canvas doesn't shift pixels around incorrectly.
* tests/TransparencyWinTest.cpp:
(WebCore::testClippedLayerKeepTransform):
(WebCore):
(WebCore::TEST):
TBR=enne@google.com
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=115492
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|