aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-23 10:30:17 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 18:28:46 +0000
commitb4e965c103c3140f0072949343befb34bceadc96 (patch)
tree71e989c6002dae88d3438d991996ad1f7725d6c9 /src/gpu/effects
parente70b9e899c987a73d964b9b630c65523ad84717a (diff)
Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.""
This reverts commit befff6580e9dc6b15bc6db3cc3f5fff22185cba8. Bug: skia: Change-Id: Ia108408cd986c03783af5058845790f6b17201f4 Reviewed-on: https://skia-review.googlesource.com/98703 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrCustomXfermode.cpp7
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.cpp5
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index bdeda9467c..b43cea9a69 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -225,6 +225,8 @@ private:
const GrCaps&,
GrPixelConfigIsClamped) const override;
+ bool asBlendMode(SkBlendMode* mode) const override;
+
GR_DECLARE_XP_FACTORY_TEST
SkBlendMode fMode;
@@ -362,6 +364,11 @@ GrXPFactory::AnalysisProperties CustomXPFactory::analysisProperties(
AnalysisProperties::kReadsDstInShader;
}
+bool CustomXPFactory::asBlendMode(SkBlendMode* mode) const {
+ *mode = fMode;
+ return true;
+}
+
GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory);
#if GR_TEST_UTILS
const GrXPFactory* CustomXPFactory::TestGet(GrProcessorTestData* d) {
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index f4af7a4679..c8f11e0f5d 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -861,6 +861,11 @@ GrXPFactory::AnalysisProperties GrPorterDuffXPFactory::analysisProperties(
return analysis_properties(color, coverage, caps, dstIsClamped, fBlendMode);
}
+bool GrPorterDuffXPFactory::asBlendMode(SkBlendMode* mode) const {
+ *mode = fBlendMode;
+ return true;
+}
+
GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory);
#if GR_TEST_UTILS
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.h b/src/gpu/effects/GrPorterDuffXferProcessor.h
index 74ae1533bf..8241a9f1ab 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.h
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.h
@@ -58,6 +58,8 @@ private:
const GrCaps&,
GrPixelConfigIsClamped) const override;
+ bool asBlendMode(SkBlendMode* mode) const override;
+
GR_DECLARE_XP_FACTORY_TEST
static void TestGetXPOutputTypes(const GrXferProcessor*, int* outPrimary, int* outSecondary);