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/SkTableMaskFilter.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/effects/SkStippleMaskFilter.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkTableMaskFilter.h
diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h
index 1c2bbd7a1b6c6fa65f87de461494856ff46bb664..63b32b2bd348aeea18303b7a7a87381345448b37 100644
--- a/include/effects/SkTableMaskFilter.h
+++ b/include/effects/SkTableMaskFilter.h
@@ -18,8 +18,6 @@
*/
class SK_API SkTableMaskFilter : public SkMaskFilter {
public:
- SkTableMaskFilter();
- SkTableMaskFilter(const uint8_t table[256]);
virtual ~SkTableMaskFilter();
/** Utility that sets the gamma table
@@ -31,6 +29,10 @@ public:
*/
static void MakeClipTable(uint8_t table[256], uint8_t min, uint8_t max);
+ static SkTableMaskFilter* Create(const uint8_t table[256]) {
+ return SkNEW_ARGS(SkTableMaskFilter, (table));
+ }
+
static SkTableMaskFilter* CreateGamma(SkScalar gamma) {
uint8_t table[256];
MakeGammaTable(table, gamma);
@@ -54,6 +56,12 @@ protected:
SkTableMaskFilter(SkReadBuffer& rb);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkTableMaskFilter();
+ SkTableMaskFilter(const uint8_t table[256]);
+
private:
uint8_t fTable[256];
« no previous file with comments | « include/effects/SkStippleMaskFilter.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698