Chromium Code Reviews| Index: ui/gfx/color_profile.cc |
| diff --git a/ui/gfx/color_profile.cc b/ui/gfx/color_profile.cc |
| index 220d993599d09cfb4ed20a0b2433562db663de85..da2fa0083a489ac8377978e9ab5b87dff854627c 100644 |
| --- a/ui/gfx/color_profile.cc |
| +++ b/ui/gfx/color_profile.cc |
| @@ -7,23 +7,27 @@ |
| namespace gfx { |
| -#if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
| -void ReadColorProfile(std::vector<char>* profile); |
| -#else |
| -void ReadColorProfile(std::vector<char>* profile) { } |
| -GFX_EXPORT bool GetDisplayColorProfile(const gfx::Rect& bounds, |
| - std::vector<char>* profile) { |
| - // TODO(port): consider screen color profile support. |
| - return false; |
| +namespace { |
| +static const size_t kMinProfileLength = 128; |
| +static const size_t kMaxProfileLength = 4 * 1024 * 1024; |
| } |
| -#endif |
| -ColorProfile::ColorProfile() { |
| - // TODO: support multiple monitors. |
| - ReadColorProfile(&profile_); |
| +ColorProfile::ColorProfile() = default; |
| +ColorProfile::ColorProfile(ColorProfile&& other) = default; |
| +ColorProfile::ColorProfile(const ColorProfile& other) = default; |
| +ColorProfile& ColorProfile::operator=(const ColorProfile& other) = default; |
| +ColorProfile::~ColorProfile() = default; |
| + |
| +#if !defined(OS_WIN) && !defined(OS_MACOSX) |
| +// static |
| +ColorProfile ColorProfile::GetFromDeepestMonitor() { |
| + return ColorProfile(); |
| } |
| +#endif |
| -ColorProfile::~ColorProfile() { |
| +// static |
| +bool ColorProfile::InvalidColorProfileLength(size_t length) { |
|
enne (OOO)
2016/06/22 21:44:24
nit: I know this existed before, but maybe call th
ccameron
2016/06/22 22:33:31
Done.
|
| + return (length < kMinProfileLength) || (length > kMaxProfileLength); |
| } |
| } // namespace gfx |