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

Unified Diff: src/effects/SkLumaColorFilter.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/SkLumaColorFilter.cpp
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index 20e0659dfeff0625bc1787054fff2f9d34d22c6f..b7860e0a0b9a1848fb73b49debd972fb332b6d8a 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -119,7 +119,16 @@ private:
}
};
-GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const {
- return LumaColorFilterEffect::Create();
+bool SkLumaColorFilter::asFragmentProcessors(GrContext*,
+ SkTDArray<GrFragmentProcessor*>* array) const {
+
+ GrFragmentProcessor* frag = LumaColorFilterEffect::Create();
+ if (frag) {
+ if (array) {
+ *array->append() = frag;
+ }
+ return true;
+ }
+ return false;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698