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

Side by Side 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: Addressed feedback 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "color_profile.h"
6
7 #include "base/basictypes.h"
8 #include "base/logging.h"
9
10 namespace gfx {
11
12 void GetColorProfile(gfx::NativeViewId parent_window,
13 std::vector<char>* profile) {
14 // Called from the FILE thread on Windows and IO thread elsewhere.
15 // Force data to leak so exit time destructors are not called.
16
17 // TODO: support multiple monitors.
18 DCHECK(!parent_window);
19 CR_DEFINE_STATIC_LOCAL(std::vector<char>, screen_profile, ());
20 static bool initialized = false;
21
22 profile->clear();
23 if (!initialized) {
24 initialized = true;
25 ReadColorProfile(parent_window, &screen_profile);
26 }
27
28 profile->assign(screen_profile.begin(), screen_profile.end());
29 }
30
31 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698