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

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

Issue 1057483003: Handle rewinds in SkBmpCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Initialize codec to defeat warning. 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 | « no previous file | 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 /*
102 * 102 *
103 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool
104 * representing success or failure. If it returned true, and codecOut was
105 * not NULL, it will be set to a new SkBmpCodec.
106 *
107 */
108 static bool ReadHeader(SkStream*, bool isIco, SkCodec** codecOut);
109
110 /*
111 *
103 * Performs the bitmap decoding for bit masks input format 112 * Performs the bitmap decoding for bit masks input format
104 * 113 *
105 */ 114 */
106 Result decodeMask(const SkImageInfo& dstInfo, void* dst, 115 Result decodeMask(const SkImageInfo& dstInfo, void* dst,
107 size_t dstRowBytes); 116 size_t dstRowBytes);
108 117
109 /* 118 /*
110 * 119 *
111 * Set an RLE pixel using the color table 120 * Set an RLE pixel using the color table
112 * 121 *
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 SkAutoTDelete<SkColorTable> fColorTable; // owned 183 SkAutoTDelete<SkColorTable> fColorTable; // owned
175 uint32_t fNumColors; 184 uint32_t fNumColors;
176 const uint32_t fBytesPerColor; 185 const uint32_t fBytesPerColor;
177 const uint32_t fOffset; 186 const uint32_t fOffset;
178 const RowOrder fRowOrder; 187 const RowOrder fRowOrder;
179 const size_t fRLEBytes; 188 const size_t fRLEBytes;
180 const bool fIsIco; 189 const bool fIsIco;
181 190
182 typedef SkCodec INHERITED; 191 typedef SkCodec INHERITED;
183 }; 192 };
OLDNEW
« no previous file with comments | « no previous file | src/codec/SkCodec_libbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698