Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 char*, size_t); |
|
reed1
2015/12/08 15:04:57
const void* ?
scroggo
2015/12/08 18:35:44
Done.
| |
| 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 Loading... | |
| 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 }; |
| OLD | NEW |