diff options
Diffstat (limited to 'chromium/ui/gfx/color_profile.h')
-rw-r--r-- | chromium/ui/gfx/color_profile.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/chromium/ui/gfx/color_profile.h b/chromium/ui/gfx/color_profile.h index 20a02bf169f..790bfe57fff 100644 --- a/chromium/ui/gfx/color_profile.h +++ b/chromium/ui/gfx/color_profile.h @@ -7,8 +7,7 @@ #include <vector> -#include "base/basictypes.h" - +#include "ui/gfx/geometry/rect.h" #include "ui/gfx/gfx_export.h" namespace gfx { @@ -31,10 +30,16 @@ class GFX_EXPORT ColorProfile { DISALLOW_COPY_AND_ASSIGN(ColorProfile); }; -// Loads the monitor color space if available. -GFX_EXPORT void GetColorProfile(std::vector<char>* profile); +inline bool InvalidColorProfileLength(size_t length) { + return (length < kMinProfileLength) || (length > kMaxProfileLength); +} +// Return the color profile of the display nearest the screen bounds. On Win32, +// this may read a file from disk, so it shouldn't be run on the UI/IO threads. +// If the given bounds are empty, or are off-screen, return false meaning there +// is no color profile associated with the bounds. +GFX_EXPORT bool GetDisplayColorProfile(const gfx::Rect& bounds, + std::vector<char>* profile); } // namespace gfx #endif // UI_GFX_COLOR_PROFILE_H_ - |