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

Unified Diff: src/gpu/SkGr.cpp

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 | « src/gpu/GrYUVProvider.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index d4db461c57d08baf3a41a119436e2ff9ee2b47aa..ee4e40a642e6c71ed4546bd2b5201725725cc95d 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -20,6 +20,7 @@
#include "GrXferProcessor.h"
#include "GrYUVProvider.h"
+#include "SkBlendModePriv.h"
#include "SkColorFilter.h"
#include "SkConfig8888.h"
#include "SkCanvas.h"
@@ -680,9 +681,8 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context,
// When the xfermode is null on the SkPaint (meaning kSrcOver) we need the XPFactory field on
// the GrPaint to also be null (also kSrcOver).
SkASSERT(!grPaint->getXPFactory());
- SkXfermode* xfermode = skPaint.getXfermode();
- if (xfermode) {
- grPaint->setXPFactory(xfermode->asXPFactory());
+ if (!skPaint.isSrcOver()) {
+ grPaint->setXPFactory(SkBlendMode_AsXPFactory(skPaint.getBlendMode()));
}
#ifndef SK_IGNORE_GPU_DITHER
« no previous file with comments | « src/gpu/GrYUVProvider.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698