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

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

Issue 24130009: promote SkImage::AlphaType to SkAlphaType (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkImage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkAlpha_DEFINED
9 #define SkAlpha_DEFINED
10
11 #include "SkTypes.h"
12
13 /**
14 * Describes how to interpret the alpha compoent of a pixel.
15 */
16 enum SkAlphaType {
17 /**
18 * All pixels should be treated as opaque, regardless of the value stored
19 * in their alpha field. Used for legacy images that wrote 0 or garbarge
20 * in their alpha field, but intended the RGB to be treated as opaque.
21 */
22 kIgnore_SkAlphaType,
23
24 /**
25 * All pixels are stored as opaque. This differs slightly from kIgnore in
26 * 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
28 * as opaque.
29 */
30 kOpaque_SkAlphaType,
31
32 /**
33 * All pixels have their alpha premultiplied in their color components.
34 * This is the natural format for the rendering target pixels.
35 */
36 kPremul_SkAlphaType,
37
38 /**
39 * All pixels have their color components stored without any regard to the
40 * alpha. e.g. this is the default configuration for PNG images.
41 *
42 * This alpha-type is ONLY supported for input images. Rendering cannot
43 * generate this on output.
44 */
45 kUnpremul_SkAlphaType,
46
47 kLastEnum_SkAlphaType = kUnpremul_SkAlphaType
48 };
49
50 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698