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

Unified Diff: include/effects/SkPixelXorXfermode.h

Issue 166583002: Factory methods for heap-allocated SkPathEffect and SkXfermode objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update experimental/PdfViewer 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/SkDiscretePathEffect.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/SkPixelXorXfermode.h
diff --git a/include/effects/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h
index 9472d9426e3ba00e83585a725129034d6eb0a5f3..cfd59ecce010d1395b60208f9d3ed0345454e0b8 100644
--- a/include/effects/SkPixelXorXfermode.h
+++ b/include/effects/SkPixelXorXfermode.h
@@ -17,7 +17,9 @@
*/
class SK_API SkPixelXorXfermode : public SkXfermode {
public:
- SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {}
+ static SkPixelXorXfermode* Create(SkColor opColor) {
+ return SkNEW_ARGS(SkPixelXorXfermode, (opColor));
+ }
SK_DEVELOPER_TO_STRING()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPixelXorXfermode)
@@ -29,6 +31,11 @@ protected:
// override from SkXfermode
virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {}
+
private:
SkColor fOpColor;
« no previous file with comments | « include/effects/SkDiscretePathEffect.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698