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

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

Issue 1513393002: Add ability to extract YUV planes from SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor Created 4 years, 11 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 /* 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 static SkImageInfo MakeN32Premul(const SkISize& size, 199 static SkImageInfo MakeN32Premul(const SkISize& size,
200 SkColorProfileType pt = kLinear_SkColorProf ileType) { 200 SkColorProfileType pt = kLinear_SkColorProf ileType) {
201 return MakeN32Premul(size.width(), size.height(), pt); 201 return MakeN32Premul(size.width(), size.height(), pt);
202 } 202 }
203 203
204 static SkImageInfo MakeA8(int width, int height) { 204 static SkImageInfo MakeA8(int width, int height) {
205 return SkImageInfo(width, height, kAlpha_8_SkColorType, kPremul_SkAlphaT ype, 205 return SkImageInfo(width, height, kAlpha_8_SkColorType, kPremul_SkAlphaT ype,
206 kLinear_SkColorProfileType); 206 kLinear_SkColorProfileType);
207 } 207 }
208 208
209 static SkImageInfo MakeGray8(int width, int height) {
210 return SkImageInfo(width, height, kGray_8_SkColorType, kPremul_SkAlphaTy pe,
211 kLinear_SkColorProfileType);
212 }
213
209 static SkImageInfo MakeUnknown(int width, int height) { 214 static SkImageInfo MakeUnknown(int width, int height) {
210 return SkImageInfo(width, height, kUnknown_SkColorType, kUnknown_SkAlpha Type, 215 return SkImageInfo(width, height, kUnknown_SkColorType, kUnknown_SkAlpha Type,
211 kLinear_SkColorProfileType); 216 kLinear_SkColorProfileType);
212 } 217 }
213 218
214 static SkImageInfo MakeUnknown() { 219 static SkImageInfo MakeUnknown() {
215 return SkImageInfo(); 220 return SkImageInfo();
216 } 221 }
217 222
218 int width() const { return fWidth; } 223 int width() const { return fWidth; }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr ofileType pt) 314 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr ofileType pt)
310 : fWidth(width) 315 : fWidth(width)
311 , fHeight(height) 316 , fHeight(height)
312 , fColorType(ct) 317 , fColorType(ct)
313 , fAlphaType(at) 318 , fAlphaType(at)
314 , fProfileType(pt) 319 , fProfileType(pt)
315 {} 320 {}
316 }; 321 };
317 322
318 #endif 323 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698