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

Unified Diff: ui/gfx/color_profile.cc

Issue 10448110: Adds monitor ICC profile support for win and mac (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix android build Created 8 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
Index: ui/gfx/color_profile.cc
diff --git a/ui/gfx/color_profile.cc b/ui/gfx/color_profile.cc
new file mode 100644
index 0000000000000000000000000000000000000000..035e821050df75914ba55d3256d10a7809114258
--- /dev/null
+++ b/ui/gfx/color_profile.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/gfx/color_profile.h"
+
+#include "base/basictypes.h"
+
+namespace gfx {
+
+#if defined(OS_WIN) || defined(OS_MAC)
+void ReadColorProfile(std::vector<char>* profile);
+#else
+void ReadColorProfile(std::vector<char>* profile) { }
+#endif
+
+void GetColorProfile(std::vector<char>* profile) {
+ // Called from the FILE thread on Windows and IO thread elsewhere.
+
+ // TODO: support multiple monitors.
+ CR_DEFINE_STATIC_LOCAL(std::vector<char>, screen_profile, ());
+ static bool initialized = false;
+
+ profile->clear();
+ if (!initialized) {
+ initialized = true;
+ ReadColorProfile(&screen_profile);
+ }
+
+ profile->assign(screen_profile.begin(), screen_profile.end());
+}
+
+} // namespace gfx
« no previous file with comments | « ui/gfx/color_profile.h ('k') | ui/gfx/color_profile_mac.cc » ('j') | ui/gfx/color_profile_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698