From: robertphillips Date: Tue, 19 Apr 2016 21:23:42 +0000 (-0700) Subject: Add explicit clip to SkSpecialSurface's SkCanvas X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~129^2~906 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c13db2a6bb4c795bec6b050b6ebd2ff5177bb5e;p=platform%2Fupstream%2FlibSkiaSharp.git 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 --- diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp index 83a0ee7..eecdaec 100644 --- a/src/core/SkSpecialSurface.cpp +++ b/src/core/SkSpecialSurface.cpp @@ -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 { }