Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: ui/gfx/color_space.h

Issue 2106303002: Color: Rename gfx::ColorProfile to gfx::ColorSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/color_profile_win.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ui/gfx/color_profile_win.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698