diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-17 13:36:14 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-17 13:36:14 +0000 |
commit | 67e78c9e47c38a51816412a24a10f4fe2db142a3 (patch) | |
tree | 13190c7dcbb06a727a0ace698609ca39d15c158f /include/effects | |
parent | 1947ba6b9efc155ebca302696a05c736c0ad7808 (diff) |
Use GrCustomStage to implement color matrix.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6716044
git-svn-id: http://skia.googlecode.com/svn/trunk@5975 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects')
-rw-r--r-- | include/effects/SkColorMatrix.h | 6 | ||||
-rw-r--r-- | include/effects/SkColorMatrixFilter.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/effects/SkColorMatrix.h b/include/effects/SkColorMatrix.h index ff02d9ddc7..84a3b7c497 100644 --- a/include/effects/SkColorMatrix.h +++ b/include/effects/SkColorMatrix.h @@ -39,6 +39,12 @@ public: void setSaturation(SkScalar sat); void setRGB2YUV(); void setYUV2RGB(); + + bool operator==(const SkColorMatrix& other) const { + return 0 == memcmp(fMat, other.fMat, sizeof(fMat)); + } + + bool operator!=(const SkColorMatrix& other) const { return !((*this) == other); } }; #endif diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index 005781f084..08eef5de88 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -21,6 +21,9 @@ public: virtual void filterSpan16(const uint16_t src[], int count, uint16_t[]) SK_OVERRIDE; virtual uint32_t getFlags() SK_OVERRIDE; virtual bool asColorMatrix(SkScalar matrix[20]) SK_OVERRIDE; +#if SK_SUPPORT_GPU + virtual GrCustomStage* asNewCustomStage(GrContext*) const SK_OVERRIDE; +#endif struct State { int32_t fArray[20]; |