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

Side by Side Diff: include/core/SkImageInfo.h

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation 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 unified diff | Download patch
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | include/core/SkShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkImageInfo_DEFINED 8 #ifndef SkImageInfo_DEFINED
9 #define SkImageInfo_DEFINED 9 #define SkImageInfo_DEFINED
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 /////////////////////////////////////////////////////////////////////////////// 170 ///////////////////////////////////////////////////////////////////////////////
171 171
172 enum SkColorProfileType { 172 enum SkColorProfileType {
173 kLinear_SkColorProfileType, 173 kLinear_SkColorProfileType,
174 kSRGB_SkColorProfileType, 174 kSRGB_SkColorProfileType,
175 175
176 kLastEnum_SkColorProfileType = kSRGB_SkColorProfileType 176 kLastEnum_SkColorProfileType = kSRGB_SkColorProfileType
177 }; 177 };
178 178
179 enum class SkSourceGammaTreatment {
180 kRespect,
181 kIgnore,
182 };
183
179 /** 184 /**
180 * Describe an image's dimensions and pixel type. 185 * Describe an image's dimensions and pixel type.
181 * Used for both src images and render-targets (surfaces). 186 * Used for both src images and render-targets (surfaces).
182 */ 187 */
183 struct SK_API SkImageInfo { 188 struct SK_API SkImageInfo {
184 public: 189 public:
185 SkImageInfo() 190 SkImageInfo()
186 : fColorSpace(nullptr) 191 : fColorSpace(nullptr)
187 , fWidth(0) 192 , fWidth(0)
188 , fHeight(0) 193 , fHeight(0)
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 371
367 static inline bool SkColorAndProfileAreGammaCorrect(SkColorType ct, SkColorProfi leType pt) { 372 static inline bool SkColorAndProfileAreGammaCorrect(SkColorType ct, SkColorProfi leType pt) {
368 return kSRGB_SkColorProfileType == pt || kRGBA_F16_SkColorType == ct; 373 return kSRGB_SkColorProfileType == pt || kRGBA_F16_SkColorType == ct;
369 } 374 }
370 375
371 static inline bool SkImageInfoIsGammaCorrect(const SkImageInfo& info) { 376 static inline bool SkImageInfoIsGammaCorrect(const SkImageInfo& info) {
372 return SkColorAndProfileAreGammaCorrect(info.colorType(), info.profileType() ); 377 return SkColorAndProfileAreGammaCorrect(info.colorType(), info.profileType() );
373 } 378 }
374 379
375 #endif 380 #endif
OLDNEW
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698