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

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: Missed one hwnd reference Created 8 years, 6 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..722f9b9a0ba0c1e5b2088902daafcee75e427300
--- /dev/null
+++ b/ui/gfx/color_profile.cc
@@ -0,0 +1,25 @@
+// 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"
+
+namespace gfx {
+
+void ColorProfile::GetColorProfile(gfx::NativeViewId parent_window,
+ std::vector<char>* profile) {
+ // Force data to leak so exit time destructors are not called.
abarth-chromium 2012/06/19 20:36:50 It's interesting that this code is called on diffe
tpayne 2012/06/19 21:44:52 Done.
+ static std::map<gfx::NativeViewId, std::vector<char> >& data =
+ *new std::map<gfx::NativeViewId, std::vector<char> >();
+
+ profile->clear();
+ std::vector<char> stored_profile;
+ if (data.find(parent_window) == data.end()) {
+ ReadProfile(parent_window, &stored_profile);
+ data[parent_window] = stored_profile;
+ }
+
+ profile->assign(data[parent_window].begin(), data[parent_window].end());
+}
+
+} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698