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

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

Issue 516463005: Add support for the Rec601 YUV color space to GrYUVtoRGBEffect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use float literals to make VS happy Created 6 years, 3 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 | « include/core/SkImageGenerator.h ('k') | include/core/SkPixelRef.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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 /** 126 /**
127 * Return true if alphaType is supported by colorType. If there is a canonical 127 * Return true if alphaType is supported by colorType. If there is a canonical
128 * alphaType for this colorType, return it in canonical. 128 * alphaType for this colorType, return it in canonical.
129 */ 129 */
130 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType, 130 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType,
131 SkAlphaType* canonical = NULL); 131 SkAlphaType* canonical = NULL);
132 132
133 /////////////////////////////////////////////////////////////////////////////// 133 ///////////////////////////////////////////////////////////////////////////////
134 134
135 /** 135 /**
136 * Describes the color space a YUV pixel.
137 */
138 enum SkYUVColorSpace {
139 /** Standard JPEG color space. */
140 kJPEG_SkYUVColorSpace,
141 /** SDTV standard Rec. 601 color space. Uses "studio swing" [16, 235] color
142 range. See http://en.wikipedia.org/wiki/Rec._601 for details. */
143 kRec601_SkYUVColorSpace,
144
145 kLastEnum_SkYUVColorSpace = kRec601_SkYUVColorSpace
146 };
147
148 ///////////////////////////////////////////////////////////////////////////////
149
150 /**
136 * Describe an image's dimensions and pixel type. 151 * Describe an image's dimensions and pixel type.
137 */ 152 */
138 struct SkImageInfo { 153 struct SkImageInfo {
139 public: 154 public:
140 SkImageInfo() 155 SkImageInfo()
141 : fWidth(0) 156 : fWidth(0)
142 , fHeight(0) 157 , fHeight(0)
143 , fColorType(kUnknown_SkColorType) 158 , fColorType(kUnknown_SkColorType)
144 , fAlphaType(kIgnore_SkAlphaType) 159 , fAlphaType(kIgnore_SkAlphaType)
145 {} 160 {}
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 private: 278 private:
264 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at) 279 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at)
265 : fWidth(width) 280 : fWidth(width)
266 , fHeight(height) 281 , fHeight(height)
267 , fColorType(ct) 282 , fColorType(ct)
268 , fAlphaType(at) 283 , fAlphaType(at)
269 {} 284 {}
270 }; 285 };
271 286
272 #endif 287 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | include/core/SkPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698