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

Side by Side Diff: ui/gfx/color_space.h

Issue 2752523006: cc: Use SkCreateColorSpaceXformCanvas for color transforms (Closed)
Patch Set: Allow to link 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_COLOR_SPACE_H_ 5 #ifndef UI_GFX_COLOR_SPACE_H_
6 #define UI_GFX_COLOR_SPACE_H_ 6 #define UI_GFX_COLOR_SPACE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 bool IsHDR() const; 158 bool IsHDR() const;
159 159
160 // Return this color space with any range adjust or YUV to RGB conversion 160 // Return this color space with any range adjust or YUV to RGB conversion
161 // stripped off. 161 // stripped off.
162 gfx::ColorSpace GetAsFullRangeRGB() const; 162 gfx::ColorSpace GetAsFullRangeRGB() const;
163 163
164 // This will return nullptr for non-RGB spaces, spaces with non-FULL 164 // This will return nullptr for non-RGB spaces, spaces with non-FULL
165 // range, and unspecified spaces. 165 // range, and unspecified spaces.
166 sk_sp<SkColorSpace> ToSkColorSpace() const; 166 sk_sp<SkColorSpace> ToSkColorSpace() const;
167 167
168 // Return an SkColorSpace that represents this color space, with output-space
169 // blending (which is only linear for color spaces with a linear tranasfer
170 // function).
171 sk_sp<SkColorSpace> ToNonlinearBlendedSkColorSpace() const;
172
173 // Populate |icc_profile| with an ICC profile that represents this color 168 // Populate |icc_profile| with an ICC profile that represents this color
174 // space. Returns false if this space is not representable. 169 // space. Returns false if this space is not representable.
175 bool GetICCProfile(ICCProfile* icc_profile) const; 170 bool GetICCProfile(ICCProfile* icc_profile) const;
176 171
177 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const; 172 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const;
178 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const; 173 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const;
179 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; 174 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const;
180 175
181 // For most formats, this is the RGB to YUV matrix. 176 // For most formats, this is the RGB to YUV matrix.
182 void GetTransferMatrix(SkMatrix44* matrix) const; 177 void GetTransferMatrix(SkMatrix44* matrix) const;
(...skipping 30 matching lines...) Expand all
213 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 208 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
214 }; 209 };
215 210
216 // Stream operator so ColorSpace can be used in assertion statements. 211 // Stream operator so ColorSpace can be used in assertion statements.
217 GFX_EXPORT std::ostream& operator<<(std::ostream& out, 212 GFX_EXPORT std::ostream& operator<<(std::ostream& out,
218 const ColorSpace& color_space); 213 const ColorSpace& color_space);
219 214
220 } // namespace gfx 215 } // namespace gfx
221 216
222 #endif // UI_GFX_COLOR_SPACE_H_ 217 #endif // UI_GFX_COLOR_SPACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698