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

Side by Side Diff: ui/gfx/icc_profile_win.cc

Issue 2203213002: ICC profile color translations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@color_correction7
Patch Set: win compile fix Created 4 years, 4 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
« no previous file with comments | « ui/gfx/icc_profile_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/icc_profile.h" 5 #include "ui/gfx/icc_profile.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // static 50 // static
51 bool ICCProfile::CachedProfilesNeedUpdate() { 51 bool ICCProfile::CachedProfilesNeedUpdate() {
52 base::AutoLock lock(g_best_monitor_color_space_lock.Get()); 52 base::AutoLock lock(g_best_monitor_color_space_lock.Get());
53 return !g_has_initialized_best_monitor_color_space; 53 return !g_has_initialized_best_monitor_color_space;
54 } 54 }
55 55
56 // static 56 // static
57 void ICCProfile::UpdateCachedProfilesOnBackgroundThread() { 57 void ICCProfile::UpdateCachedProfilesOnBackgroundThread() {
58 std::vector<char> icc_profile; 58 std::vector<char> icc_profile;
59 ReadBestMonitorICCProfile(&icc_profile); 59 ReadBestMonitorICCProfile(&icc_profile);
60 gfx::ICCProfile color_space = FromData(icc_profile); 60 gfx::ICCProfile color_space = FromData(
61 icc_profile.data(), icc_profile.size());
61 62
62 base::AutoLock lock(g_best_monitor_color_space_lock.Get()); 63 base::AutoLock lock(g_best_monitor_color_space_lock.Get());
63 g_best_monitor_color_space.Get() = color_space; 64 g_best_monitor_color_space.Get() = color_space;
64 g_has_initialized_best_monitor_color_space = true; 65 g_has_initialized_best_monitor_color_space = true;
65 } 66 }
66 67
67 } // namespace gfx 68 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/icc_profile_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698