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

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

Issue 1472123002: Make SkCodec support peek() and read() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years 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/SkCodec.cpp ('k') | src/codec/SkCodec_libgif.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"
11 #include "SkSwizzler.h" 11 #include "SkSwizzler.h"
12 12
13 #include "gif_lib.h" 13 #include "gif_lib.h"
14 14
15 /* 15 /*
16 * 16 *
17 * This class implements the decoding for gif images 17 * This class implements the decoding for gif images
18 * 18 *
19 */ 19 */
20 class SkGifCodec : public SkCodec { 20 class SkGifCodec : public SkCodec {
21 public: 21 public:
22 22 static bool IsGif(const void*, size_t);
23 /*
24 * Checks the start of the stream to see if the image is a gif
25 */
26 static bool IsGif(SkStream*);
27 23
28 /* 24 /*
29 * Assumes IsGif was called and returned true 25 * Assumes IsGif was called and returned true
30 * Creates a gif decoder 26 * Creates a gif decoder
31 * Reads enough of the stream to determine the image format 27 * Reads enough of the stream to determine the image format
32 */ 28 */
33 static SkCodec* NewFromStream(SkStream*); 29 static SkCodec* NewFromStream(SkStream*);
34 30
35 protected: 31 protected:
36 32
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 SkAutoTDeleteArray<uint8_t> fSrcBuffer; 194 SkAutoTDeleteArray<uint8_t> fSrcBuffer;
199 const SkIRect fFrameRect; 195 const SkIRect fFrameRect;
200 const uint32_t fTransIndex; 196 const uint32_t fTransIndex;
201 uint32_t fFillIndex; 197 uint32_t fFillIndex;
202 const bool fFrameIsSubset; 198 const bool fFrameIsSubset;
203 SkAutoTDelete<SkSwizzler> fSwizzler; 199 SkAutoTDelete<SkSwizzler> fSwizzler;
204 SkAutoTUnref<SkColorTable> fColorTable; 200 SkAutoTUnref<SkColorTable> fColorTable;
205 201
206 typedef SkCodec INHERITED; 202 typedef SkCodec INHERITED;
207 }; 203 };
OLDNEW
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698