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

Unified Diff: include/gpu/GrPaint.h

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/SkXfermodeImageFilter.h ('k') | include/gpu/effects/GrPorterDuffXferProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrPaint.h
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 6120348792809ee6765579607a7d1f8e05729996..a8af3c2f172dacf1347406316e48457d0793e41e 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -16,9 +16,9 @@
#include "effects/GrPorterDuffXferProcessor.h"
#include "GrFragmentProcessor.h"
+#include "SkBlendMode.h"
#include "SkRefCnt.h"
#include "SkRegion.h"
-#include "SkXfermode.h"
/**
* The paint describes how color and coverage are computed at each pixel by GrContext draw
@@ -95,6 +95,10 @@ public:
fXPFactory = std::move(xpFactory);
}
+ void setPorterDuffXPFactory(SkBlendMode mode) {
+ fXPFactory = GrPorterDuffXPFactory::Make((SkXfermode::Mode)mode);
+ }
+
void setPorterDuffXPFactory(SkXfermode::Mode mode) {
fXPFactory = GrPorterDuffXPFactory::Make(mode);
}
« no previous file with comments | « include/effects/SkXfermodeImageFilter.h ('k') | include/gpu/effects/GrPorterDuffXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698