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..6ae701a02db03387c9ab1662c3302481219f84da |
--- /dev/null |
+++ b/ui/gfx/color_profile.cc |
@@ -0,0 +1,28 @@ |
+// 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 "color_profile.h" |
Noel Gordon
2012/07/16 12:14:27
#include "ui/gfx/color_profile.h"
tpayne
2012/07/16 23:44:16
Done.
|
+ |
+#include "base/basictypes.h" |
+#include "base/logging.h" |
Noel Gordon
2012/07/16 12:14:27
You're not using logging.h
tpayne
2012/07/16 23:44:16
Done.
|
+ |
+namespace gfx { |
+ |
+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 |