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 #ifndef SkCodec_DEFINED | 8 #ifndef SkCodec_DEFINED |
9 #define SkCodec_DEFINED | 9 #define SkCodec_DEFINED |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 * succeeded. | 77 * succeeded. |
78 * - if the stream did not need to be rewound. | 78 * - if the stream did not need to be rewound. |
79 * false | 79 * false |
80 * - if the stream needed to be rewound, and rewind failed. | 80 * - if the stream needed to be rewound, and rewind failed. |
81 * Subclasses MUST call this function before reading the stream (e.g. in | 81 * Subclasses MUST call this function before reading the stream (e.g. in |
82 * onGetPixels). If it returns false, onGetPixels should return | 82 * onGetPixels). If it returns false, onGetPixels should return |
83 * kCouldNotRewind. | 83 * kCouldNotRewind. |
84 */ | 84 */ |
85 bool SK_WARN_UNUSED_RESULT rewindIfNeeded(); | 85 bool SK_WARN_UNUSED_RESULT rewindIfNeeded(); |
86 | 86 |
87 /* | |
88 * | |
89 * Get method for the input stream | |
90 * | |
91 */ | |
92 SkStream* stream() { | |
93 return fStream.get(); | |
94 } | |
95 | |
96 private: | 87 private: |
97 const SkImageInfo fInfo; | 88 const SkImageInfo fInfo; |
98 SkAutoTDelete<SkStream> fStream; | 89 SkAutoTDelete<SkStream> fStream; |
99 bool fNeedsRewind; | 90 bool fNeedsRewind; |
100 }; | 91 }; |
101 #endif // SkCodec_DEFINED | 92 #endif // SkCodec_DEFINED |
OLD | NEW |