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

Unified Diff: include/private/SkImageInfoPriv.h

Issue 1893203006: Make all the codecs default profiles based on gDefaultProfileIsSRGB. (Closed) Base URL: https://skia.googlesource.com/skia.git@add-imageinfo-to-SkImage_Base
Patch Set: Make private work. 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
Index: include/private/SkImageInfoPriv.h
diff --git a/include/private/SkImageInfoPriv.h b/include/private/SkImageInfoPriv.h
new file mode 100644
index 0000000000000000000000000000000000000000..93ef2740a648619ff1748eeff22373692ba5bb9b
--- /dev/null
+++ b/include/private/SkImageInfoPriv.h
@@ -0,0 +1,19 @@
+/*
+ * 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 SkImageInfoPriv_DEFINED
+#define SkImageInfoPriv_DEFINED
+
+#include "SkImageInfo.h"
+
+// Indicate how images and gradients should interpret colors by default.
+extern bool gDefaultProfileIsSRGB;
+
+static SkColorProfileType SkDefaultColorProfile() {
+ return gDefaultProfileIsSRGB ? kSRGB_SkColorProfileType : kLinear_SkColorProfileType;
+}
+
+#endif // SkImageInfoPriv_DEFINED
« no previous file with comments | « include/codec/SkEncodedInfo.h ('k') | src/core/SkBitmap.cpp » ('j') | src/core/SkBitmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698