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 #include "SkStream.h" | 10 #include "SkStream.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 * @return the index of the matching codec or -1 if there is no | 64 * @return the index of the matching codec or -1 if there is no |
65 * matching codec between startIndex and the end of | 65 * matching codec between startIndex and the end of |
66 * the array. | 66 * the array. |
67 */ | 67 */ |
68 int chooseCodec(const SkISize& requestedSize, int startIndex); | 68 int chooseCodec(const SkISize& requestedSize, int startIndex); |
69 | 69 |
70 /* | 70 /* |
71 * Constructor called by NewFromStream | 71 * Constructor called by NewFromStream |
72 * @param embeddedCodecs codecs for the embedded images, takes ownership | 72 * @param embeddedCodecs codecs for the embedded images, takes ownership |
73 */ | 73 */ |
74 SkIcoCodec(const SkImageInfo& srcInfo, SkTArray<SkAutoTDelete<SkCodec>, true
>* embeddedCodecs); | 74 SkIcoCodec(const SkEncodedInfo& info, SkTArray<SkAutoTDelete<SkCodec>, true>
* embeddedCodecs); |
75 | 75 |
76 SkAutoTDelete<SkTArray<SkAutoTDelete<SkCodec>, true>> fEmbeddedCodecs; // ow
ned | 76 SkAutoTDelete<SkTArray<SkAutoTDelete<SkCodec>, true>> fEmbeddedCodecs; // ow
ned |
77 | 77 |
78 // Only used by the scanline decoder. onStartScanlineDecode() will set | 78 // Only used by the scanline decoder. onStartScanlineDecode() will set |
79 // fCurrScanlineCodec to one of the fEmbeddedCodecs, if it can find a | 79 // fCurrScanlineCodec to one of the fEmbeddedCodecs, if it can find a |
80 // codec of the appropriate size. We will use fCurrScanlineCodec for | 80 // codec of the appropriate size. We will use fCurrScanlineCodec for |
81 // subsequent calls to onGetScanlines() or onSkipScanlines(). | 81 // subsequent calls to onGetScanlines() or onSkipScanlines(). |
82 // fCurrScanlineCodec is owned by this class, but should not be an | 82 // fCurrScanlineCodec is owned by this class, but should not be an |
83 // SkAutoTDelete. It will be deleted by the destructor of fEmbeddedCodecs. | 83 // SkAutoTDelete. It will be deleted by the destructor of fEmbeddedCodecs. |
84 SkCodec* fCurrScanlineCodec; | 84 SkCodec* fCurrScanlineCodec; |
85 | 85 |
86 typedef SkCodec INHERITED; | 86 typedef SkCodec INHERITED; |
87 }; | 87 }; |
OLD | NEW |