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

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

Issue 2691213007: color: Don't use QCMS for transforms unless necessary (Closed)
Patch Set: color: Don't use QCMS for transforms unless necessary Created 3 years, 10 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 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool operator==(const ColorSpace& other) const; 137 bool operator==(const ColorSpace& other) const;
138 bool operator!=(const ColorSpace& other) const; 138 bool operator!=(const ColorSpace& other) const;
139 bool operator<(const ColorSpace& other) const; 139 bool operator<(const ColorSpace& other) const;
140 140
141 bool IsHDR() const; 141 bool IsHDR() const;
142 142
143 // This will return nullptr for non-RGB spaces, spaces with non-FULL 143 // This will return nullptr for non-RGB spaces, spaces with non-FULL
144 // range, and unspecified spaces. 144 // range, and unspecified spaces.
145 sk_sp<SkColorSpace> ToSkColorSpace() const; 145 sk_sp<SkColorSpace> ToSkColorSpace() const;
146 146
147 // Populate |icc_profile| with an ICC profile that represents this color
148 // space. Returns false if this space is not representable. This ICC profile
149 // will be constructed ignoring the range adjust and transfer matrices.
150 bool GetICCProfile(ICCProfile* icc_profile) const;
151
147 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const; 152 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const;
148 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const; 153 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const;
149 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; 154 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const;
150 155
151 // For most formats, this is the RGB to YUV matrix. 156 // For most formats, this is the RGB to YUV matrix.
152 void GetTransferMatrix(SkMatrix44* matrix) const; 157 void GetTransferMatrix(SkMatrix44* matrix) const;
153 void GetRangeAdjustMatrix(SkMatrix44* matrix) const; 158 void GetRangeAdjustMatrix(SkMatrix44* matrix) const;
154 159
155 private: 160 private:
156 PrimaryID primaries_ = PrimaryID::INVALID; 161 PrimaryID primaries_ = PrimaryID::INVALID;
(...skipping 18 matching lines...) Expand all
175 friend class ColorTransform; 180 friend class ColorTransform;
176 friend class ColorTransformInternal; 181 friend class ColorTransformInternal;
177 friend class ColorSpaceWin; 182 friend class ColorSpaceWin;
178 friend struct IPC::ParamTraits<gfx::ColorSpace>; 183 friend struct IPC::ParamTraits<gfx::ColorSpace>;
179 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 184 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
180 }; 185 };
181 186
182 } // namespace gfx 187 } // namespace gfx
183 188
184 #endif // UI_GFX_COLOR_SPACE_H_ 189 #endif // UI_GFX_COLOR_SPACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698