Chromium Code Reviews| Index: ui/gfx/color_profile.cc |
| diff --git a/ui/gfx/color_profile.cc b/ui/gfx/color_profile.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f6d3a85396e8e3e44df6818894dc977f42cf97f7 |
| --- /dev/null |
| +++ b/ui/gfx/color_profile.cc |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/gfx/color_profile.h" |
| + |
| +#include "base/basictypes.h" |
| + |
| +namespace gfx { |
| + |
| +void GetColorProfile(std::vector<char>* profile) { |
| + // Called from the FILE thread on Windows and IO thread elsewhere. |
| + |
| + // TODO: support multiple monitors. |
| + 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
|
| + static bool initialized = false; |
| + |
| + profile->clear(); |
| + if (!initialized) { |
| + initialized = true; |
| + ReadColorProfile(&screen_profile); |
| + } |
| + |
| + profile->assign(screen_profile.begin(), screen_profile.end()); |
| +} |
| + |
| +} // namespace gfx |