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

Unified Diff: include/effects/SkBlurDrawLooper.h

Issue 232913003: Make sure SkDrawLooper objects can only be allocated on the heap. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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 | « gm/tilemodes_scaled.cpp ('k') | include/effects/SkLayerDrawLooper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkBlurDrawLooper.h
diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h
index 5469e2cf02f880992d3a6154b9891b2b9fd1941a..fe945c3801d5dca6d9c1a811c6c642d57c2c8eaa 100644
--- a/include/effects/SkBlurDrawLooper.h
+++ b/include/effects/SkBlurDrawLooper.h
@@ -35,12 +35,16 @@ public:
kAll_BlurFlag = 0x07
};
- SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy,
- uint32_t flags = kNone_BlurFlag);
+ static SkBlurDrawLooper* Create(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy,
+ uint32_t flags = kNone_BlurFlag) {
+ return SkNEW_ARGS(SkBlurDrawLooper, (color, sigma, dx, dy, flags));
+ }
-// SK_ATTR_DEPRECATED("use sigma version")
+#ifdef SK_SUPPORT_LEGACY_BLURDRAWLOOPERCONSTRUCTORS
SkBlurDrawLooper(SkScalar radius, SkScalar dx, SkScalar dy, SkColor color,
uint32_t flags = kNone_BlurFlag);
+#endif
+
virtual ~SkBlurDrawLooper();
virtual SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const SK_OVERRIDE;
@@ -51,6 +55,9 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurDrawLooper)
protected:
+ SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy,
+ uint32_t flags);
+
SkBlurDrawLooper(SkReadBuffer&);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
« no previous file with comments | « gm/tilemodes_scaled.cpp ('k') | include/effects/SkLayerDrawLooper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698