Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: gm/drawfilter.cpp

Issue 2303033002: record drawfilters (Closed)
Patch Set: remove obsolete comment Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkLiteDL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/drawfilter.cpp
diff --git a/gm/drawfilter.cpp b/gm/drawfilter.cpp
index 33e1d0085352125cd77a3af44d86949965a1ee93..d989c4ccecda2c86529eef54e8a2df34f29e68a8 100644
--- a/gm/drawfilter.cpp
+++ b/gm/drawfilter.cpp
@@ -57,12 +57,9 @@ protected:
SkRect r = { 20, 20, 100, 100 };
canvas->setDrawFilter(nullptr);
canvas->drawRect(r, p);
- TestFilter redNoBlur;
- canvas->setDrawFilter(&redNoBlur);
+ canvas->setDrawFilter(new TestFilter)->unref();
canvas->translate(120.0f, 40.0f);
canvas->drawRect(r, p);
-
- // Must unset if the DrawFilter is from the stack to avoid refcount errors!
canvas->setDrawFilter(nullptr);
}
« no previous file with comments | « no previous file | src/core/SkLiteDL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698