Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 void GetColorProfile(std::vector<char>* profile) { | |
| 12 // Called from the FILE thread on Windows and IO thread elsewhere. | |
| 13 | |
| 14 // TODO: support multiple monitors. | |
| 15 CR_DEFINE_STATIC_LOCAL(std::vector<char>, screen_profile, ()); | |
|
sky
2012/07/18 14:36:18
I can't tell from your comment if this is called f
tpayne
2012/07/18 17:41:52
It seems that src/ui is not allowed to depend on s
| |
| 16 static bool initialized = false; | |
| 17 | |
| 18 profile->clear(); | |
| 19 if (!initialized) { | |
| 20 initialized = true; | |
| 21 ReadColorProfile(&screen_profile); | |
| 22 } | |
| 23 | |
| 24 profile->assign(screen_profile.begin(), screen_profile.end()); | |
| 25 } | |
| 26 | |
| 27 } // namespace gfx | |
| OLD | NEW |