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

Unified Diff: include/client/android/SkPixelXorXfermode.h

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 9 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
Index: include/client/android/SkPixelXorXfermode.h
diff --git a/include/client/android/SkPixelXorXfermode.h b/include/client/android/SkPixelXorXfermode.h
index 447bd813176fafe825dc8220566c7cd0370ec61c..b6fd97992698fcb9c6f1029a4b6a65be45f2484c 100644
--- a/include/client/android/SkPixelXorXfermode.h
+++ b/include/client/android/SkPixelXorXfermode.h
@@ -17,9 +17,14 @@
*/
class SK_API SkPixelXorXfermode : public SkXfermode {
public:
+ static sk_sp<SkXfermode> Make(SkColor opColor) {
+ return sk_sp<SkXfermode>(new SkPixelXorXfermode(opColor));
+ }
+#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
static SkXfermode* Create(SkColor opColor) {
- return new SkPixelXorXfermode(opColor);
+ return Make(opColor).release();
}
+#endif
#if SK_SUPPORT_GPU
const GrFragmentProcessor* getFragmentProcessorForImageFilter(

Powered by Google App Engine
This is Rietveld 408576698