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

Unified Diff: src/core/SkColorMatrixFilterRowMajor255.h

Issue 1513393002: Add ability to extract YUV planes from SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rename 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
Index: src/core/SkColorMatrixFilterRowMajor255.h
diff --git a/src/core/SkColorMatrixFilterRowMajor255.h b/src/core/SkColorMatrixFilterRowMajor255.h
index 7e8d75e84a73ed423fabb0b8014017a46b1acec0..6ed7d4831a7022cbca398a8c7af70047f05e0733 100644
--- a/src/core/SkColorMatrixFilterRowMajor255.h
+++ b/src/core/SkColorMatrixFilterRowMajor255.h
@@ -14,6 +14,9 @@ class SK_API SkColorMatrixFilterRowMajor255 : public SkColorFilter {
public:
explicit SkColorMatrixFilterRowMajor255(const SkScalar array[20]);
+ /** Creates a color matrix filter that returns the same value in all four channels. */
+ static SkColorFilter* CreateSingleChannelOutput(const SkScalar row[5]);
+
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;
@@ -31,11 +34,13 @@ protected:
void flatten(SkWriteBuffer&) const override;
private:
+ SkColorMatrixFilterRowMajor255() {};
+
SkScalar fMatrix[20];
float fTranspose[20]; // for Sk4s
uint32_t fFlags;
- void initState(const SkScalar array[20]);
+ void initState();
typedef SkColorFilter INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698