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

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

Issue 2691213007: color: Don't use QCMS for transforms unless necessary (Closed)
Patch Set: Incorporate review feedback 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
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 (this
150 // is to match the IOSurface interface which takes the ICC profile and range
151 // and transfer matrices separately).
152 bool GetICCProfile(ICCProfile* icc_profile) const;
153
147 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const; 154 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const;
148 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const; 155 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const;
149 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; 156 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const;
150 157
151 // For most formats, this is the RGB to YUV matrix. 158 // For most formats, this is the RGB to YUV matrix.
152 void GetTransferMatrix(SkMatrix44* matrix) const; 159 void GetTransferMatrix(SkMatrix44* matrix) const;
153 void GetRangeAdjustMatrix(SkMatrix44* matrix) const; 160 void GetRangeAdjustMatrix(SkMatrix44* matrix) const;
154 161
155 private: 162 private:
156 PrimaryID primaries_ = PrimaryID::INVALID; 163 PrimaryID primaries_ = PrimaryID::INVALID;
(...skipping 18 matching lines...) Expand all
175 friend class ColorTransform; 182 friend class ColorTransform;
176 friend class ColorTransformInternal; 183 friend class ColorTransformInternal;
177 friend class ColorSpaceWin; 184 friend class ColorSpaceWin;
178 friend struct IPC::ParamTraits<gfx::ColorSpace>; 185 friend struct IPC::ParamTraits<gfx::ColorSpace>;
179 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 186 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
180 }; 187 };
181 188
182 } // namespace gfx 189 } // namespace gfx
183 190
184 #endif // UI_GFX_COLOR_SPACE_H_ 191 #endif // UI_GFX_COLOR_SPACE_H_
OLDNEW
« 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