aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-04-12 11:05:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-12 15:41:50 +0000
commitdd8ae14528bd8e37bcb98f4c452acf21850c4b3b (patch)
tree0a8eccb00ebae22ac3ab193b9caf3a3fd83141d6
parent371001bbf7a9a2b484f88108edf34facfd058795 (diff)
always clear the looper when we're unrolling it, to not confused devices
Discovered by https://skia-review.googlesource.com/c/skia/+/119570 Bug: skia: Change-Id: I18c13052c5eb410a46ab16e2f1015861948678af Reviewed-on: https://skia-review.googlesource.com/121062 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
-rw-r--r--src/core/SkCanvas.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 803b370901..3d81ae69e8 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -433,6 +433,7 @@ public:
const SkPaint& paint() const {
SkASSERT(fPaint);
+ SkASSERT(fPaint->getDrawLooper() == nullptr); // we should have cleared this
return *fPaint;
}
@@ -471,6 +472,8 @@ bool AutoDrawLooper::doNext(SkDrawFilter::Type drawType) {
SkPaint* paint = fLazyPaintPerLooper.set(fLazyPaintInit.isValid() ?
*fLazyPaintInit.get() : fOrigPaint);
+ // never want our downstream clients (i.e. devices) to see loopers
+ paint->setDrawLooper(nullptr);
if (fTempLayerForImageFilter) {
paint->setImageFilter(nullptr);