Commit 19dde480 authored by fmalita@chromium.org's avatar fmalita@chromium.org

Fix FEImage SKP bounds

When recording its filterPicture, FEImage::createImageFilterForLayoutObject() transforms the
content such that it draws into dstRect - but it keeps the recording bounds at origin
(FloatRect(FloatPoint(), dstRect.size())).

This means that the picture content can draw outside its declared bounds, and is susceptible to
incorrect culling.

Since we're mapping the content into dstRect, we should use the same for picture culling.

R=senorblanco@chromium.org

Review URL: https://codereview.chromium.org/1298283003

git-svn-id: svn://svn.chromium.org/blink/trunk@200914 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 30e84771
......@@ -174,7 +174,7 @@ PassRefPtr<SkImageFilter> FEImage::createImageFilterForLayoutObject(LayoutObject
transform.translate(dstRect.x(), dstRect.y());
}
SkPictureBuilder filterPicture(FloatRect(FloatPoint(), dstRect.size()));
SkPictureBuilder filterPicture(dstRect);
{
TransformRecorder transformRecorder(filterPicture.context(), layoutObject, transform);
SVGPaintContext::paintSubtree(&filterPicture.context(), &layoutObject);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment