SkPictureImageFilter - clear local canvas before use
In SkPictureImageFilter::onFilterImage, we may create two new surfaces, one for our final output, and one for a local resolution intermediate. We clear the final output surface before use, removing any previous content, however we do not do the same for the local surface. This can lead to content being incorrectly layered on top of previous content when we go down this path. This change adds logic to clear the local surface as well. BUG=610667 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1969193002 Review-Url: https://codereview.chromium.org/1969193002
This commit is contained in:
parent
97fc9308e3
commit
a31312cddd
@ -178,6 +178,8 @@ void SkPictureImageFilter::drawPictureAtLocalResolution(SkSpecialImage* source,
|
||||
SkCanvas* localCanvas = localSurface->getCanvas();
|
||||
SkASSERT(localCanvas);
|
||||
|
||||
localCanvas->clear(0x0);
|
||||
|
||||
localCanvas->translate(-SkIntToScalar(localIBounds.fLeft),
|
||||
-SkIntToScalar(localIBounds.fTop));
|
||||
localCanvas->drawPicture(fPicture);
|
||||
|
Loading…
Reference in New Issue
Block a user