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

Unified Diff: include/gpu/GrFragmentProcessor.h

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang 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 | « include/gpu/GrColor.h ('k') | include/gpu/GrInvariantOutput.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrFragmentProcessor.h
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index 4b0e1e12d0568a5d6a213a863012dcbc126eea58..776e8931f9d7b4de17f805ca0eddc8c94a2a060c 100644
--- a/include/gpu/GrFragmentProcessor.h
+++ b/include/gpu/GrFragmentProcessor.h
@@ -31,7 +31,21 @@ public:
* does so by returning a parent FP that multiplies the passed in FPs output by the parent's
* input alpha. The passed in FP will not receive an input color.
*/
- static const GrFragmentProcessor* MulOuputByInputAlpha(const GrFragmentProcessor*);
+ static const GrFragmentProcessor* MulOutputByInputAlpha(const GrFragmentProcessor*);
+
+ /**
+ * Similar to the above but it modulates the output r,g,b of the child processor by the input
+ * rgb and then multiplies all the components by the input alpha. This effectively modulates
+ * the child processor's premul color by a unpremul'ed input and produces a premul output
+ */
+ static const GrFragmentProcessor* MulOutputByInputUnpremulColor(const GrFragmentProcessor*);
+
+ /**
+ * Returns a parent fragment processor that adopts the passed fragment processor as a child. The
+ * parent will ignore its input color and instead feed the passed in color as input to the
+ * child.
+ */
+ static const GrFragmentProcessor* OverrideInput(const GrFragmentProcessor*, GrColor);
GrFragmentProcessor()
: INHERITED()
« no previous file with comments | « include/gpu/GrColor.h ('k') | include/gpu/GrInvariantOutput.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698