Index: include/effects/SkColorProfileFilter.h |
diff --git a/include/effects/SkColorProfileFilter.h b/include/effects/SkColorProfileFilter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d66e4adf0e781049174150e45be8c429370faad3 |
--- /dev/null |
+++ b/include/effects/SkColorProfileFilter.h |
@@ -0,0 +1,44 @@ |
+/* |
+ * 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 "SkBitmap.h" |
+ |
+class SK_API SkColorProfileFilter : public SkColorFilter { |
+public: |
+ static SkColorProfileFilter* Create(const SkBitmap& colorCube); |
+ |
+ virtual void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; |
+ |
+#if SK_SUPPORT_GPU |
+ virtual GrEffect* asNewEffect(GrContext*) const SK_OVERRIDE; |
+#endif |
+ |
+ SK_TO_STRING_OVERRIDE() |
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorProfileFilter) |
+ |
+protected: |
+ SkColorProfileFilter(const SkBitmap& colorCube); |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+ SkColorProfileFilter(SkReadBuffer& buffer); |
+#endif |
+ virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
+ |
+private: |
+ void initProcessingLuts(); |
+ |
+ SkBitmap fColorCube; |
bsalomon
2014/09/24 20:29:44
I don't think SkBitmap is the right container for
sugoi1
2014/09/24 20:44:27
I can do that, I would then need to add the approp
|
+ SkAutoMalloc fLutStorage; |
+ int* fColorToIndex[2]; |
+ SkScalar* fColorToFactors[2]; |
+ typedef SkColorFilter INHERITED; |
+}; |
+ |
+#endif |