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

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

Issue 1291803002: Extend SkImageGenerator to support natively generated GrTextures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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
11 #include "SkMath.h" 11 #include "SkMath.h"
12 #include "SkRect.h" 12 #include "SkRect.h"
13 #include "SkSize.h" 13 #include "SkSize.h"
14 14
15 class SkReadBuffer; 15 class SkReadBuffer;
16 class SkWriteBuffer; 16 class SkWriteBuffer;
17 17
18 /** 18 /**
19 * This enum provides information about "how" an image will be used. For older GPUs that do not
20 * support non-power-of-2 tiling, some routines need to know this information b efore they create
21 * a texture.
22 */
23 enum SkImageUsageType {
24 /* Image will not be tiled (regardless of filtering) */
25 kUntiled_SkImageUsageType,
26
27 /* Image will be tiled, but not filtered */
28 kTiled_Unfiltered_SkImageUsageType,
29
30 /* Image will be tiled and filtered */
31 kTiled_Filtered_SkImageUsageType,
32 };
33
34 /**
19 * Describes how to interpret the alpha compoent of a pixel. 35 * Describes how to interpret the alpha compoent of a pixel.
20 */ 36 */
21 enum SkAlphaType { 37 enum SkAlphaType {
22 kUnknown_SkAlphaType, 38 kUnknown_SkAlphaType,
23 39
24 /** 40 /**
25 * All pixels are stored as opaque. This differs slightly from kIgnore in 41 * All pixels are stored as opaque. This differs slightly from kIgnore in
26 * that kOpaque has correct "opaque" values stored in the pixels, while 42 * that kOpaque has correct "opaque" values stored in the pixels, while
27 * kIgnore may not, but in both cases the caller should treat the pixels 43 * kIgnore may not, but in both cases the caller should treat the pixels
28 * as opaque. 44 * as opaque.
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr ofileType pt) 325 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr ofileType pt)
310 : fWidth(width) 326 : fWidth(width)
311 , fHeight(height) 327 , fHeight(height)
312 , fColorType(ct) 328 , fColorType(ct)
313 , fAlphaType(at) 329 , fAlphaType(at)
314 , fProfileType(pt) 330 , fProfileType(pt)
315 {} 331 {}
316 }; 332 };
317 333
318 #endif 334 #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