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

Unified Diff: src/core/SkComposeShader.cpp

Issue 1334293003: Create fragment processor for performing input color blend with child processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 3 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/core/SkColorFilter.cpp ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkComposeShader.cpp
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 41b978b5c8bd3891abd85f120c01f54358bf69be..024064b50a0e061d96f21a02680daa1ab5b79239 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -207,17 +207,15 @@ const GrFragmentProcessor* SkComposeShader::asFragmentProcessor(GrContext* conte
SkFilterQuality fq,
GrProcessorDataManager* procDataManager
) const {
- // Fragment processor will only support coefficient modes. This is because
- // GrGLBlend::AppendPorterDuffBlend(), which emits the blend code in the shader,
- // only supports those modes.
+ // Fragment processor will only support SkXfermode::Mode modes currently.
SkXfermode::Mode mode;
- if (!(SkXfermode::AsMode(fMode, &mode) && SkXfermode::kLastCoeffMode >= mode)) {
+ if (!(SkXfermode::AsMode(fMode, &mode))) {
return nullptr;
}
switch (mode) {
case SkXfermode::kClear_Mode:
- return GrConstColorProcessor::Create(GrColor_TRANS_BLACK,
+ return GrConstColorProcessor::Create(GrColor_TRANSPARENT_BLACK,
GrConstColorProcessor::kIgnore_InputMode);
break;
case SkXfermode::kSrc_Mode:
« no previous file with comments | « src/core/SkColorFilter.cpp ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698