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

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: small cleanup 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
Index: include/gpu/GrFragmentProcessor.h
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index 4b0e1e12d0568a5d6a213a863012dcbc126eea58..784912662764665dd03caa92d2d28fa5d022a34a 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.
+ */
robertphillips 2015/09/25 19:52:17 OverrideInputColor ?
bsalomon 2015/09/25 20:45:07 Made it OverrideInput
+ static const GrFragmentProcessor* ReplaceInput(const GrFragmentProcessor*, GrColor);
GrFragmentProcessor()
: INHERITED()

Powered by Google App Engine
This is Rietveld 408576698