aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-03-02 13:46:03 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-02 13:46:03 -0800
commit8a8d841d485ff36b64d838575eb3735c1ddcf929 (patch)
tree06546784b0c8403a634954c352d2378e2456341e /include/effects
parentaae309111ba1803be5cfa2a81c273aa80ef3f825 (diff)
add virtuals to optimize composing colorfilters
Diffstat (limited to 'include/effects')
-rw-r--r--include/effects/SkColorMatrix.h3
-rw-r--r--include/effects/SkColorMatrixFilter.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/effects/SkColorMatrix.h b/include/effects/SkColorMatrix.h
index c598a1210e..7ac457900b 100644
--- a/include/effects/SkColorMatrix.h
+++ b/include/effects/SkColorMatrix.h
@@ -59,6 +59,9 @@ public:
}
bool operator!=(const SkColorMatrix& other) const { return !((*this) == other); }
+
+ static bool NeedsClamping(const SkScalar[20]);
+ static void SetConcat(SkScalar result[20], const SkScalar outer[20], const SkScalar inner[20]);
};
#endif
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index b5ab689002..ff806072a2 100644
--- a/include/effects/SkColorMatrixFilter.h
+++ b/include/effects/SkColorMatrixFilter.h
@@ -25,6 +25,8 @@ public:
void filterSpan16(const uint16_t src[], int count, uint16_t[]) const SK_OVERRIDE;
uint32_t getFlags() const SK_OVERRIDE;
bool asColorMatrix(SkScalar matrix[20]) const SK_OVERRIDE;
+ SkColorFilter* newComposed(const SkColorFilter*) const SK_OVERRIDE;
+
#if SK_SUPPORT_GPU
GrFragmentProcessor* asFragmentProcessor(GrContext*) const SK_OVERRIDE;
#endif