aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrPaint.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-10-03 15:44:23 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-03 20:02:20 +0000
commit70cdb396eb5ffbbed128b902532e9292b5ec0e9d (patch)
treed6a3bc707ac55d6823f7966adfacd88c6f23d903 /include/gpu/GrPaint.h
parentafb48b62272e280d766f8e97c9cdd3417961a546 (diff)
Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/gpu/GrPaint.h')
-rw-r--r--include/gpu/GrPaint.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 6120348792..a8af3c2f17 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);
}