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

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

Issue 1055743003: Swizzler changes Index8 and 565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix windows errors Created 5 years, 8 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 | « gyp/tests.gypi ('k') | src/codec/SkCodec_libbmp.cpp » ('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 2015 Google Inc. 2 * Copyright 2015 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 #include "SkCodec.h" 8 #include "SkCodec.h"
9 #include "SkColorTable.h" 9 #include "SkColorTable.h"
10 #include "SkImageInfo.h" 10 #include "SkImageInfo.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 enum BitmapInputFormat { 79 enum BitmapInputFormat {
80 kStandard_BitmapInputFormat, 80 kStandard_BitmapInputFormat,
81 kRLE_BitmapInputFormat, 81 kRLE_BitmapInputFormat,
82 kBitMask_BitmapInputFormat, 82 kBitMask_BitmapInputFormat,
83 kUnknown_BitmapInputFormat 83 kUnknown_BitmapInputFormat
84 }; 84 };
85 85
86 /* 86 /*
87 * 87 *
88 * Creates the color table 88 * Creates the color table
89 * 89 * Sets colorCount to the new color count if it is non-NULL
90 */ 90 */
91 bool createColorTable(SkAlphaType alphaType); 91 bool createColorTable(SkAlphaType alphaType, int* colorCount);
92 92
93 /* 93 /*
94 * 94 *
95 * Creates a bmp decoder 95 * Creates a bmp decoder
96 * Reads enough of the stream to determine the image format 96 * Reads enough of the stream to determine the image format
97 * 97 *
98 */ 98 */
99 static SkCodec* NewFromStream(SkStream*, bool isIco); 99 static SkCodec* NewFromStream(SkStream*, bool isIco);
100 100
101 /* 101 /*
(...skipping 12 matching lines...) Expand all
114 * 114 *
115 */ 115 */
116 Result decodeMask(const SkImageInfo& dstInfo, void* dst, 116 Result decodeMask(const SkImageInfo& dstInfo, void* dst,
117 size_t dstRowBytes); 117 size_t dstRowBytes);
118 118
119 /* 119 /*
120 * 120 *
121 * Set an RLE pixel using the color table 121 * Set an RLE pixel using the color table
122 * 122 *
123 */ 123 */
124 void setRLEPixel(SkPMColor* dst, size_t dstRowBytes, 124 void setRLEPixel(void* dst, size_t dstRowBytes,
125 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, 125 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
126 uint8_t index); 126 uint8_t index);
127 /* 127 /*
128 * 128 *
129 * Set an RLE24 pixel from R, G, B values 129 * Set an RLE24 pixel from R, G, B values
130 * 130 *
131 */ 131 */
132 void setRLE24Pixel(SkPMColor* dst, size_t dstRowBytes, 132 void setRLE24Pixel(void* dst, size_t dstRowBytes,
133 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, 133 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
134 uint8_t red, uint8_t green, uint8_t blue); 134 uint8_t red, uint8_t green, uint8_t blue);
135 135
136 /* 136 /*
137 * 137 *
138 * Performs the bitmap decoding for RLE input format 138 * Performs the bitmap decoding for RLE input format
139 * 139 *
140 */ 140 */
141 Result decodeRLE(const SkImageInfo& dstInfo, void* dst, 141 Result decodeRLE(const SkImageInfo& dstInfo, void* dst,
142 size_t dstRowBytes); 142 size_t dstRowBytes, const Options& opts);
143 143
144 /* 144 /*
145 * 145 *
146 * Performs the bitmap decoding for standard input format 146 * Performs the bitmap decoding for standard input format
147 * 147 *
148 */ 148 */
149 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes); 149 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
150 150
151 /* 151 /*
152 * 152 *
(...skipping 21 matching lines...) Expand all
174 SkBmpCodec(const SkImageInfo& srcInfo, SkStream* stream, 174 SkBmpCodec(const SkImageInfo& srcInfo, SkStream* stream,
175 uint16_t bitsPerPixel, BitmapInputFormat format, 175 uint16_t bitsPerPixel, BitmapInputFormat format,
176 SkMasks* masks, uint32_t numColors, uint32_t bytesPerColor, 176 SkMasks* masks, uint32_t numColors, uint32_t bytesPerColor,
177 uint32_t offset, RowOrder rowOrder, size_t RLEBytes, 177 uint32_t offset, RowOrder rowOrder, size_t RLEBytes,
178 bool isIco); 178 bool isIco);
179 179
180 // Fields 180 // Fields
181 const uint16_t fBitsPerPixel; 181 const uint16_t fBitsPerPixel;
182 const BitmapInputFormat fInputFormat; 182 const BitmapInputFormat fInputFormat;
183 SkAutoTDelete<SkMasks> fMasks; // owned 183 SkAutoTDelete<SkMasks> fMasks; // owned
184 SkAutoTDelete<SkColorTable> fColorTable; // owned 184 SkAutoTUnref<SkColorTable> fColorTable; // owned
185 uint32_t fNumColors; 185 uint32_t fNumColors;
186 const uint32_t fBytesPerColor; 186 const uint32_t fBytesPerColor;
187 const uint32_t fOffset; 187 const uint32_t fOffset;
188 const RowOrder fRowOrder; 188 const RowOrder fRowOrder;
189 const size_t fRLEBytes; 189 const size_t fRLEBytes;
190 const bool fIsIco; 190 const bool fIsIco;
191 191
192 typedef SkCodec INHERITED; 192 typedef SkCodec INHERITED;
193 }; 193 };
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/codec/SkCodec_libbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698