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

Side by Side Diff: src/codec/SkMasks.h

Issue 1012873002: Revert "Implementation of image decoding for bmp files, in accordance with the new API." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « src/codec/SkMaskSwizzler.cpp ('k') | src/codec/SkMasks.cpp » ('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 2015 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 #include "SkTypes.h"
8
9 /*
10 *
11 * Contains useful mask routines for SkMaskSwizzler
12 *
13 */
14 class SkMasks {
15 public:
16
17 /*
18 *
19 * Input bit masks format
20 *
21 */
22 struct InputMasks {
23 uint32_t red;
24 uint32_t green;
25 uint32_t blue;
26 uint32_t alpha;
27 };
28
29 /*
30 *
31 * Contains all of the information for a single mask
32 *
33 */
34 struct MaskInfo {
35 uint32_t mask;
36 uint32_t shift;
37 uint32_t size;
38 };
39
40 /*
41 *
42 * Create the masks object
43 *
44 */
45 static SkMasks* CreateMasks(InputMasks masks, uint32_t bpp);
46
47 /*
48 *
49 * Get a color component
50 *
51 */
52 uint8_t getRed(uint32_t pixel);
53 uint8_t getGreen(uint32_t pixel);
54 uint8_t getBlue(uint32_t pixel);
55 uint8_t getAlpha(uint32_t pixel);
56
57 /*
58 *
59 * Getter for the alpha mask
60 * The alpha mask may be used in other decoding modes
61 *
62 */
63 uint32_t getAlphaMask() {
64 return fAlpha.mask;
65 }
66
67 private:
68
69 /*
70 *
71 * Constrcutor
72 *
73 */
74 SkMasks(const MaskInfo red, const MaskInfo green, const MaskInfo blue,
75 const MaskInfo alpha);
76
77 const MaskInfo fRed;
78 const MaskInfo fGreen;
79 const MaskInfo fBlue;
80 const MaskInfo fAlpha;
81 };
OLDNEW
« no previous file with comments | « src/codec/SkMaskSwizzler.cpp ('k') | src/codec/SkMasks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698