| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |