Index: include/effects/SkColorProfileFilter.h |
diff --git a/include/effects/SkColorProfileFilter.h b/include/effects/SkColorProfileFilter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f6380798ead8821097517251e356a7bc4d6bea4c |
--- /dev/null |
+++ b/include/effects/SkColorProfileFilter.h |
@@ -0,0 +1,49 @@ |
+/* |
+ * Copyright 2014 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef SkColorProfileFilter_DEFINED |
+#define SkColorProfileFilter_DEFINED |
+ |
+#include "SkColorFilter.h" |
+#include "SkData.h" |
+ |
+class SK_API SkColorProfileFilter : public SkColorFilter { |
+public: |
+ static SkColorProfileFilter* Create(SkData* cubeData, int cubeDimension); |
+ |
+ ~SkColorProfileFilter(); |
+ |
+ virtual void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; |
+ |
+#if SK_SUPPORT_GPU |
+ virtual GrFragmentProcessor* asFragmentProcessor(GrContext*) const SK_OVERRIDE; |
+#endif |
+ |
+ SK_TO_STRING_OVERRIDE() |
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorProfileFilter) |
+ |
+protected: |
+ SkColorProfileFilter(SkData* cubeData, int cubeDimension); |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+ SkColorProfileFilter(SkReadBuffer& buffer); |
+#endif |
+ virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
+ |
+private: |
+ void initProcessingLuts(); |
+ |
+ SkData* fCubeData; |
+ int32_t fCubeDimension; |
+ int32_t fGenerationID; |
bsalomon
2014/09/26 14:23:50
If this never changes (since color filters are imm
|
+ SkAutoMalloc fLutStorage; |
+ int* fColorToIndex[2]; |
+ SkScalar* fColorToFactors[2]; |
+ SkMutex fInitMutex; |
+ typedef SkColorFilter INHERITED; |
+}; |
+ |
+#endif |