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 "SkImageInfo.h" | 9 #include "SkImageInfo.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 static SkCodec* NewFromStream(SkStream*); | 31 static SkCodec* NewFromStream(SkStream*); |
32 | 32 |
33 | 33 |
34 protected: | 34 protected: |
35 | 35 |
36 /* | 36 /* |
37 * Read enough of the stream to initialize the SkGifCodec. | 37 * Read enough of the stream to initialize the SkGifCodec. |
38 * Returns a bool representing success or failure. | 38 * Returns a bool representing success or failure. |
39 * | 39 * |
40 * @param codecOut | 40 * @param codecOut |
41 * If it returned true, and codecOut was not NULL, | 41 * If it returned true, and codecOut was not nullptr, |
42 * codecOut will be set to a new SkGifCodec. | 42 * codecOut will be set to a new SkGifCodec. |
43 * | 43 * |
44 * @param gifOut | 44 * @param gifOut |
45 * If it returned true, and codecOut was NULL, | 45 * If it returned true, and codecOut was nullptr, |
46 * gifOut must be non-NULL and gifOut will be set to a new | 46 * gifOut must be non-nullptr and gifOut will be set to a new |
47 * GifFileType pointer. | 47 * GifFileType pointer. |
48 * | 48 * |
49 * @param stream | 49 * @param stream |
50 * Deleted on failure. | 50 * Deleted on failure. |
51 * codecOut will take ownership of it in the case where we created a codec. | 51 * codecOut will take ownership of it in the case where we created a codec. |
52 * Ownership is unchanged when we returned a gifOut. | 52 * Ownership is unchanged when we returned a gifOut. |
53 * | 53 * |
54 */ | 54 */ |
55 static bool ReadHeader(SkStream* stream, SkCodec** codecOut, GifFileType** g
ifOut); | 55 static bool ReadHeader(SkStream* stream, SkCodec** codecOut, GifFileType** g
ifOut); |
56 | 56 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 * @param stream the stream of image data | 88 * @param stream the stream of image data |
89 * @param gif pointer to library type that manages gif decode | 89 * @param gif pointer to library type that manages gif decode |
90 * takes ownership | 90 * takes ownership |
91 */ | 91 */ |
92 SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType* gif); | 92 SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType* gif); |
93 | 93 |
94 SkAutoTCallVProc<GifFileType, CloseGif> fGif; // owned | 94 SkAutoTCallVProc<GifFileType, CloseGif> fGif; // owned |
95 | 95 |
96 typedef SkCodec INHERITED; | 96 typedef SkCodec INHERITED; |
97 }; | 97 }; |
OLD | NEW |