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

Unified Diff: include/effects/SkEmbossMaskFilter.h

Issue 173633003: Factory methods for heap-allocated SkMaskFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add SkTableMaskFilter::Create(table) and remove deprecated SkEmbossMaskFilter constructor. Created 6 years, 10 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 | « include/core/SkMaskFilter.h ('k') | include/effects/SkKernel33MaskFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkEmbossMaskFilter.h
diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h
index 263c5e054509cb16007767be48c0d45d4cba0968..0843911181f353446d8e58526e8d80c77504a890 100644
--- a/include/effects/SkEmbossMaskFilter.h
+++ b/include/effects/SkEmbossMaskFilter.h
@@ -23,10 +23,9 @@ public:
uint8_t fSpecular; // exponent, 4.4 right now
};
- SkEmbossMaskFilter(SkScalar blurSigma, const Light& light);
-
- SK_ATTR_DEPRECATED("use sigma version")
- SkEmbossMaskFilter(const Light& light, SkScalar blurRadius);
+ static SkEmbossMaskFilter* Create(SkScalar blurSigma, const Light& light) {
+ return SkNEW_ARGS(SkEmbossMaskFilter, (blurSigma, light));
+ }
// overrides from SkMaskFilter
// This method is not exported to java.
@@ -42,6 +41,11 @@ protected:
SkEmbossMaskFilter(SkReadBuffer&);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkEmbossMaskFilter(SkScalar blurSigma, const Light& light);
+
private:
Light fLight;
SkScalar fBlurSigma;
« no previous file with comments | « include/core/SkMaskFilter.h ('k') | include/effects/SkKernel33MaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698