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

Unified Diff: include/gpu/GrColorSpaceXform.h

Issue 2154753003: Introduce GrColorSpaceXform, for gamut conversion on textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More progress & refactoring Created 4 years, 5 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
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrPaint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrColorSpaceXform.h
diff --git a/include/gpu/GrColorSpaceXform.h b/include/gpu/GrColorSpaceXform.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea90739fd2f0354f931de32c5b5112db4163aa5a
--- /dev/null
+++ b/include/gpu/GrColorSpaceXform.h
@@ -0,0 +1,31 @@
+/*
+ * 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 GrColorSpaceXform_DEFINED
+#define GrColorSpaceXform_DEFINED
+
+#include "SkMatrix44.h"
+#include "SkRefCnt.h"
+
+class SkColorSpace;
+
+ /**
+ * Represents a color gamut transformation (as a 4x4 color matrix)
+ */
+class GrColorSpaceXform : public SkRefCnt {
+public:
+ GrColorSpaceXform(const SkMatrix44& srcToDst) : fSrcToDst(srcToDst) {}
+
+ static sk_sp<GrColorSpaceXform> Make(SkColorSpace* src, SkColorSpace* dst);
+
+ const SkMatrix44& srcToDst() { return fSrcToDst; }
+
+private:
+ SkMatrix44 fSrcToDst;
+};
+
+#endif
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698