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

Unified Diff: include/effects/SkColorMatrixFilter.h

Issue 1648933002: Move SkColorMatrixFilter implementation to core. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add back newComposed override Created 4 years, 11 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/core/SkColorFilter.h ('k') | src/core/SkColorMatrixFilterRowMajor255.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkColorMatrixFilter.h
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index 3edf791f06bd263198f14a8d24825dc25b11c4dc..d71d2ed5332d1f08c822b18acee34c3e3f619106 100644
--- a/include/effects/SkColorMatrixFilter.h
+++ b/include/effects/SkColorMatrixFilter.h
@@ -14,10 +14,10 @@
class SK_API SkColorMatrixFilter : public SkColorFilter {
public:
static SkColorFilter* Create(const SkColorMatrix& cm) {
- return new SkColorMatrixFilter(cm);
+ return SkColorFilter::CreateMatrixFilterRowMajor255(cm.fMat);
}
static SkColorFilter* Create(const SkScalar array[20]) {
- return new SkColorMatrixFilter(array);
+ return SkColorFilter::CreateMatrixFilterRowMajor255(array);
}
/**
@@ -27,34 +27,6 @@ public:
* are ignored.
*/
static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add);
-
- void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
- void filterSpan4f(const SkPM4f src[], int count, SkPM4f[]) const override;
- uint32_t getFlags() const override;
- bool asColorMatrix(SkScalar matrix[20]) const override;
- SkColorFilter* newComposed(const SkColorFilter*) const override;
-
-#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
-#endif
-
- SK_TO_STRING_OVERRIDE()
-
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter)
-
-protected:
- explicit SkColorMatrixFilter(const SkColorMatrix&);
- explicit SkColorMatrixFilter(const SkScalar array[20]);
- void flatten(SkWriteBuffer&) const override;
-
-private:
- SkColorMatrix fMatrix;
- float fTranspose[SkColorMatrix::kCount]; // for Sk4s
- uint32_t fFlags;
-
- void initState(const SkScalar array[20]);
-
- typedef SkColorFilter INHERITED;
};
#endif
« no previous file with comments | « include/core/SkColorFilter.h ('k') | src/core/SkColorMatrixFilterRowMajor255.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698