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

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

Issue 2148013002: Revert of Color: Don't duplicate ICC profile data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ui/gfx/color_space.cc ('k') | ui/gfx/color_space_x11.cc » ('j') | 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/color_space.h" 5 #include "ui/gfx/color_space.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // static 52 // static
53 bool ColorSpace::CachedProfilesNeedUpdate() { 53 bool ColorSpace::CachedProfilesNeedUpdate() {
54 base::AutoLock lock(g_best_monitor_color_space_lock.Get()); 54 base::AutoLock lock(g_best_monitor_color_space_lock.Get());
55 return !g_has_initialized_best_monitor_color_space; 55 return !g_has_initialized_best_monitor_color_space;
56 } 56 }
57 57
58 // static 58 // static
59 void ColorSpace::UpdateCachedProfilesOnBackgroundThread() { 59 void ColorSpace::UpdateCachedProfilesOnBackgroundThread() {
60 std::vector<char> icc_profile; 60 std::vector<char> icc_profile;
61 ReadBestMonitorICCProfile(&icc_profile); 61 ReadBestMonitorICCProfile(&icc_profile);
62 gfx::ColorSpace color_space = FromICCProfile(icc_profile);
63 62
64 base::AutoLock lock(g_best_monitor_color_space_lock.Get()); 63 base::AutoLock lock(g_best_monitor_color_space_lock.Get());
65 g_best_monitor_color_space.Get() = color_space; 64 g_best_monitor_color_space.Get().icc_profile_ = icc_profile;
66 g_has_initialized_best_monitor_color_space = true; 65 g_has_initialized_best_monitor_color_space = true;
67 } 66 }
68 67
69 } // namespace gfx 68 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/color_space.cc ('k') | ui/gfx/color_space_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698