diff options
author | robertphillips <robertphillips@google.com> | 2016-04-19 14:23:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-19 14:23:42 -0700 |
commit | 4c13db2a6bb4c795bec6b050b6ebd2ff5177bb5e (patch) | |
tree | 7f81a22be8bb794768bb6e65972c31e846a05365 /src/core/SkSpecialSurface.cpp | |
parent | 244a65350e52c9438931ecdc05a4913f29d343bc (diff) |
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
Diffstat (limited to 'src/core/SkSpecialSurface.cpp')
-rw-r--r-- | src/core/SkSpecialSurface.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp index 83a0ee7a19..eecdaecd61 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 { } |