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

Unified Diff: include/core/SkColorFilter.h

Issue 1368423003: Use child processors to implement compose color filter. (Closed) Base URL: https://skia.googlesource.com/skia.git@upm
Patch Set: Address comments 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 | « no previous file | include/effects/SkColorCubeFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColorFilter.h
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index a92f9aeff2899e2807e3966798868974a018dd99..a5a1a4c0cc546d8229e4c3481a0212cbd52af696 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -124,20 +124,17 @@ public:
static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilter* inner);
/**
- * A subclass may implement this factory function to work with the GPU backend.
- * If it returns true, then 1 or more fragment processors will have been appended to the
- * array, each of which has been ref'd, so that the caller is responsible for calling unref()
- * on them when they are finished. If more than one processor is appended, they will be
- * applied in FIFO order.
+ * A subclass may implement this factory function to work with the GPU backend. It returns
+ * a GrFragmentProcessor that implemets the color filter in GPU shader code.
*
- * The fragment processor(s) must each return their color as a premul normalized value
- * e.g. each component between [0..1] and each color component <= alpha.
+ * The fragment processor receives a premultiplied input color and produces a premultiplied
+ * output color.
*
- * If the subclass returns false, then it should not modify the array at all.
+ * A null return indicates that the color filter isn't implemented for the GPU backend.
*/
- virtual bool asFragmentProcessors(GrContext*, GrProcessorDataManager*,
- SkTDArray<const GrFragmentProcessor*>*) const {
- return false;
+ virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*,
+ GrProcessorDataManager*) const {
+ return nullptr;
}
bool affectsTransparentBlack() const {
« no previous file with comments | « no previous file | include/effects/SkColorCubeFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698