aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-10-05 17:33:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-05 17:33:03 -0700
commit374772bd61951f01bf84fe17bf53d8867681c9ae (patch)
treeade94be090be12f7503fd35e77c4dae2dc1f0a47 /src/gpu/SkGr.cpp
parent61c21cdcc31081a1bd4a3a7480b482d135f7df33 (diff)
Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index d4db461c57..ee4e40a642 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