Add explicit clip to SkSpecialSurface's SkCanvas

It seems safer (and is probably more performant) to enforce this internal to SkSpecialSurface.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903553002

Review URL: https://codereview.chromium.org/1903553002
This commit is contained in:
robertphillips 2016-04-19 14:23:42 -07:00 committed by Commit bot
parent 244a65350e
commit 4c13db2a6b

View File

@ -77,6 +77,7 @@ public:
fBitmap.setPixelRef(pr);
fCanvas.reset(new SkCanvas(fBitmap, this->props()));
fCanvas->clipRect(SkRect::Make(subset));
}
~SkSpecialSurface_Raster() override { }
@ -134,6 +135,7 @@ public:
}
fCanvas.reset(new SkCanvas(device));
fCanvas->clipRect(SkRect::Make(subset));
}
~SkSpecialSurface_Gpu() override { }