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

Unified Diff: ui/gfx/color_space.h

Issue 2738713003: color: Ensure that VideoResourceUpdater give consistent colors (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « gpu/ipc/client/gpu_memory_buffer_impl_io_surface.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_space.h b/ui/gfx/color_space.h
index cad6165f26c5330e5ec0fd06763a24322041fdf5..f472af359fdf011060b221774dd763a8b6beed50 100644
--- a/ui/gfx/color_space.h
+++ b/ui/gfx/color_space.h
@@ -6,6 +6,7 @@
#define UI_GFX_COLOR_SPACE_H_
#include <stdint.h>
+#include <ostream>
#include "base/gtest_prod_util.h"
#include "base/macros.h"
@@ -144,9 +145,14 @@ class GFX_EXPORT ColorSpace {
bool operator==(const ColorSpace& other) const;
bool operator!=(const ColorSpace& other) const;
bool operator<(const ColorSpace& other) const;
+ std::string ToString() const;
bool IsHDR() const;
+ // Return this color space with any range adjust or YUV to RGB conversion
+ // stripped off.
+ gfx::ColorSpace GetAsFullRangeRGB() const;
+
// This will return nullptr for non-RGB spaces, spaces with non-FULL
// range, and unspecified spaces.
sk_sp<SkColorSpace> ToSkColorSpace() const;
@@ -157,10 +163,7 @@ class GFX_EXPORT ColorSpace {
sk_sp<SkColorSpace> ToNonlinearBlendedSkColorSpace() const;
// Populate |icc_profile| with an ICC profile that represents this color
- // space. Returns false if this space is not representable. This ICC profile
- // will be constructed ignoring the range adjust and transfer matrices (this
- // is to match the IOSurface interface which takes the ICC profile and range
- // and transfer matrices separately).
+ // space. Returns false if this space is not representable.
bool GetICCProfile(ICCProfile* icc_profile) const;
void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const;
@@ -202,6 +205,10 @@ class GFX_EXPORT ColorSpace {
FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
};
+// Stream operator so ColorSpace can be used in assertion statements.
+GFX_EXPORT std::ostream& operator<<(std::ostream& out,
+ const ColorSpace& color_space);
+
} // namespace gfx
#endif // UI_GFX_COLOR_SPACE_H_
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_io_surface.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698