Index: ui/gfx/color_space.h |
diff --git a/ui/gfx/color_profile.h b/ui/gfx/color_space.h |
similarity index 50% |
rename from ui/gfx/color_profile.h |
rename to ui/gfx/color_space.h |
index 04157e36b530adc4bffc33758694f64556821147..686e7520eca3223eb8e6fb9cf8e207ba0580ae94 100644 |
--- a/ui/gfx/color_profile.h |
+++ b/ui/gfx/color_space.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef UI_GFX_COLOR_PROFILE_H_ |
-#define UI_GFX_COLOR_PROFILE_H_ |
+#ifndef UI_GFX_COLOR_SPACE_H_ |
+#define UI_GFX_COLOR_SPACE_H_ |
#include <vector> |
@@ -13,36 +13,36 @@ |
namespace gfx { |
-class GFX_EXPORT ColorProfile { |
+class GFX_EXPORT ColorSpace { |
public: |
- ColorProfile(const std::vector<char>& profile); |
- ColorProfile(); |
- ColorProfile(ColorProfile&& other); |
- ColorProfile(const ColorProfile& other); |
- ColorProfile& operator=(const ColorProfile& other); |
- ~ColorProfile(); |
+ ColorSpace(); |
+ ColorSpace(ColorSpace&& other); |
+ ColorSpace(const ColorSpace& other); |
+ ColorSpace& operator=(const ColorSpace& other); |
+ ~ColorSpace(); |
+ bool operator==(const ColorSpace& other) const; |
- const std::vector<char>& profile() const { return profile_; } |
+ // Returns the color profile of the monitor that can best represent color. |
+ // This profile should be used for creating content that does not know on |
+ // which monitor it will be displayed. |
+ static ColorSpace FromBestMonitor(); |
+ static ColorSpace FromICCProfile(const std::vector<char>& icc_profile); |
+ |
+ const std::vector<char>& GetICCProfile() const { return icc_profile_; } |
#if defined(OS_WIN) |
- // This will read color profile information from disk and cache the results |
- // for the other functions to read. This should not be called on the UI or IO |
- // thread. |
+ // This will read monitor ICC profiles from disk and cache the results for the |
+ // other functions to read. This should not be called on the UI or IO thread. |
static void UpdateCachedProfilesOnBackgroundThread(); |
static bool CachedProfilesNeedUpdate(); |
#endif |
- // Returns the color profile of the monitor that can best represent color. |
- // This profile should be used for creating content that does not know on |
- // which monitor it will be displayed. |
- static ColorProfile GetFromBestMonitor(); |
- |
static bool IsValidProfileLength(size_t length); |
private: |
- std::vector<char> profile_; |
+ std::vector<char> icc_profile_; |
}; |
} // namespace gfx |
-#endif // UI_GFX_COLOR_PROFILE_H_ |
+#endif // UI_GFX_COLOR_SPACE_H_ |