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

Unified Diff: include/core/SkShader.h

Issue 1347943003: Replace GrExtractAlphaFragmentProcessor with DstIn compose processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gyp/gpu.gypi ('k') | include/gpu/effects/GrExtractAlphaFragmentProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkShader.h
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index a95e7e713e4dedb79c8ea865e217c070f200bca8..ec598f3f6a938c0b5c44f98e4a185c5bc642663f 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -432,6 +432,15 @@ protected:
return false;
}
+ /**
+ * A helper for asFragmentProcessor() implementations. Many implementations want to compute
+ * a color in a FP and then multiply that color by the incoming color's (usually paint color's)
+ * alpha, ignoring the incoming r,g,b. This wraps a FP in a parent FP that does exactly that.
+ * There will be no input color to the wrapped FP.
+ */
+ static const GrFragmentProcessor* MulFragmentProcesorOuputByInputAlpha(
reed1 2015/09/16 13:34:27 Curious why this is on shader, and not on GrFragme
bsalomon 2015/09/21 15:29:50 Done.
+ const GrFragmentProcessor*);
+
private:
// This is essentially const, but not officially so it can be modified in
// constructors.
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/effects/GrExtractAlphaFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698