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

Unified Diff: src/core/SkColorSpaceXform_A2B.h

Issue 2449243003: Initial implementation of a SkColorSpace_A2B xform (Closed)
Patch Set: build error+forgot to premuliplty last 0-3 pixels of a line+whitespace warnings Created 4 years, 2 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/SkColorSpaceXform_A2B.h
diff --git a/src/core/SkColorSpaceXform_A2B.h b/src/core/SkColorSpaceXform_A2B.h
new file mode 100644
index 0000000000000000000000000000000000000000..84a3125a5ac95e7bdeaa2aabe1e6f7c76d777cd8
--- /dev/null
+++ b/src/core/SkColorSpaceXform_A2B.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkColorSpaceXform_A2B_DEFINED
+#define SkColorSpaceXform_A2B_DEFINED
+
+#include "SkColorSpaceXform_Base.h"
+
+#include <memory>
+#include <vector>
+
+class SkColorSpace_A2B;
+class SkColorSpace_XYZ;
+enum SkGammaNamed : uint8_t;
+
+class SkColorSpaceXform_A2B : public SkColorSpaceXform_Base {
+public:
+ bool onApply(ColorFormat dstFormat, void* dst, ColorFormat srcFormat, const void* src,
+ int count, SkAlphaType alphaType) const override;
+
+private:
+ SkColorSpaceXform_A2B(SkColorSpace_A2B* srcSpace, SkColorSpace_XYZ* dstSpace);
+
+ void concatTransforms();
+
+ class ProcessingElement;
+ class ApplyCLUT;
+ class LabToXYZ;
+ class ApplyMatrix;
+ class ApplyGammaSRGB;
+ class ApplyGamma2Dot2;
+ class ApplyGammaValue;
+ class ApplyGammaParams;
+ class ApplyGammaTable;
+
+ std::vector<std::unique_ptr<ProcessingElement>> fProcessingElements;
+ const uint8_t* fDstGammaTables[3];
+ sk_sp<SkData> fDstStorage;
+ SkGammaNamed fDstGamma;
+
+ friend class SkColorSpaceXform;
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698