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

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 973593002: change colorfilter to return an array of frag processors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update gm Created 5 years, 10 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: src/effects/SkColorMatrixFilter.cpp
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 6ab4a674875b849a5e3dc8d6a89a09af5978f111..bb3b6dda78b462e02454e3b536519cba51bf8d75 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -494,8 +494,16 @@ GrFragmentProcessor* ColorMatrixEffect::TestCreate(SkRandom* random,
return ColorMatrixEffect::Create(colorMatrix);
}
-GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*) const {
- return ColorMatrixEffect::Create(fMatrix);
+bool SkColorMatrixFilter::asFragmentProcessors(GrContext*,
+ SkTDArray<GrFragmentProcessor*>* array) const {
+ GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix);
+ if (frag) {
+ if (array) {
+ *array->append() = frag;
+ }
+ return true;
+ }
+ return false;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698