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

Unified Diff: include/core/SkColorSpace.h

Issue 2001203003: Write ICC profiles from SkColorSpace object (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: std::move Created 4 years, 7 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 | « no previous file | src/core/SkColorSpace.cpp » ('j') | src/core/SkColorSpace.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColorSpace.h
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h
index 9630fe4c2508b3e49383685abb21fe972f8101a7..653c3e8b3dfcd0a4b95df936dfe67750dc9e8a37 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -8,9 +8,9 @@
#ifndef SkColorSpace_DEFINED
#define SkColorSpace_DEFINED
+#include "SkData.h"
#include "SkMatrix44.h"
#include "SkRefCnt.h"
-#include "../private/SkTemplates.h"
class SkColorSpace : public SkRefCnt {
public:
@@ -27,7 +27,7 @@ public:
/**
* Create an SkColorSpace from the src gamma and a transform from src gamut to D50 XYZ.
*/
- static sk_sp<SkColorSpace> NewRGB(float gammas[3], const SkMatrix44& toXYZD50);
+ static sk_sp<SkColorSpace> NewRGB(const float gammas[3], const SkMatrix44& toXYZD50);
/**
* Create a common, named SkColorSpace.
@@ -63,13 +63,20 @@ public:
*/
SkMatrix44 xyz() const { return fToXYZD50; }
+ /**
+ * Writes this object as an ICC profile. Used for serialization.
+ */
+ sk_sp<SkData> writeToICC();
msarett 2016/05/24 15:36:58 We may not need this to be a public API if/when we
reed1 2016/05/24 16:04:46 1. should be const 2. no need to mention "serializ
msarett 2016/05/24 18:38:05 Done.
+
protected:
- SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named);
+ SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named,
+ sk_sp<SkData> profileData);
const GammaNamed fGammaNamed;
const SkMatrix44 fToXYZD50;
const Named fNamed;
+ sk_sp<SkData> fProfileData;
};
#endif
« no previous file with comments | « no previous file | src/core/SkColorSpace.cpp » ('j') | src/core/SkColorSpace.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698