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

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: 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 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 "ui/gfx/color_profile.h"
6
7 #include "base/basictypes.h"
8
9 namespace gfx {
10
11 #if defined(OS_WIN) || defined(OS_MAC)
12 void ReadColorProfile(std::vector<char>* profile);
13 #else
14 void ReadColorProfile(std::vector<char>* profile) { }
15 #endif
16
17 void GetColorProfile(std::vector<char>* profile) {
18 // Called from the FILE thread on Windows and IO thread elsewhere.
19
20 // TODO: support multiple monitors.
21 CR_DEFINE_STATIC_LOCAL(std::vector<char>, screen_profile, ());
22 static bool initialized = false;
23
24 profile->clear();
25 if (!initialized) {
26 initialized = true;
27 ReadColorProfile(&screen_profile);
28 }
29
30 profile->assign(screen_profile.begin(), screen_profile.end());
31 }
32
33 } // namespace gfx
OLDNEW
« 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