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

Unified Diff: src/core/SkImageInfo.cpp

Issue 1917443002: SkDefaultColorProfile: Hide gDefaultProfileIsSRGB (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « include/private/SkImageInfoPriv.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageInfo.cpp
diff --git a/src/core/SkImageInfo.cpp b/src/core/SkImageInfo.cpp
index 21b206df781e3fec25e42f9b9d5fc5d26fa215d7..5f0a4919eeeddaa23fa3a535a5d8e2064fc88a4a 100644
--- a/src/core/SkImageInfo.cpp
+++ b/src/core/SkImageInfo.cpp
@@ -6,10 +6,17 @@
*/
#include "SkImageInfo.h"
+#include "SkImageInfoPriv.h"
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"
-SK_API bool gDefaultProfileIsSRGB;
+// Indicate how images and gradients should interpret colors by default.
+bool gDefaultProfileIsSRGB;
+
+SkColorProfileType SkDefaultColorProfile() {
+ return gDefaultProfileIsSRGB ? kSRGB_SkColorProfileType
+ : kLinear_SkColorProfileType;
+}
static bool profile_type_is_valid(SkColorProfileType profileType) {
return (profileType >= 0) && (profileType <= kLastEnum_SkColorProfileType);
« no previous file with comments | « include/private/SkImageInfoPriv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698