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 #ifndef SkCodec_DEFINED | 8 #ifndef SkCodec_DEFINED |
| 9 #define SkCodec_DEFINED | 9 #define SkCodec_DEFINED |
| 10 | 10 |
| 11 #include "SkCodecPriv.h" | |
|
scroggo
2015/03/12 19:58:40
Does this file depend on anything in SkCodecPriv?
msarett
2015/03/12 21:59:41
Done.
| |
| 12 #include "SkEndian.h" | |
| 11 #include "SkImageGenerator.h" | 13 #include "SkImageGenerator.h" |
| 12 #include "SkImageInfo.h" | 14 #include "SkImageInfo.h" |
| 13 #include "SkSize.h" | 15 #include "SkSize.h" |
| 14 #include "SkTemplates.h" | 16 #include "SkTemplates.h" |
| 15 #include "SkTypes.h" | 17 #include "SkTypes.h" |
| 16 | 18 |
| 17 class SkData; | 19 class SkData; |
| 18 class SkStream; | 20 class SkStream; |
| 19 | 21 |
| 20 /** | 22 /** |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 * succeeded. | 79 * succeeded. |
| 78 * - if the stream did not need to be rewound. | 80 * - if the stream did not need to be rewound. |
| 79 * false | 81 * false |
| 80 * - if the stream needed to be rewound, and rewind failed. | 82 * - if the stream needed to be rewound, and rewind failed. |
| 81 * Subclasses MUST call this function before reading the stream (e.g. in | 83 * Subclasses MUST call this function before reading the stream (e.g. in |
| 82 * onGetPixels). If it returns false, onGetPixels should return | 84 * onGetPixels). If it returns false, onGetPixels should return |
| 83 * kCouldNotRewind. | 85 * kCouldNotRewind. |
| 84 */ | 86 */ |
| 85 bool SK_WARN_UNUSED_RESULT rewindIfNeeded(); | 87 bool SK_WARN_UNUSED_RESULT rewindIfNeeded(); |
| 86 | 88 |
| 89 /* | |
| 90 * | |
| 91 * Get method for the input stream | |
| 92 * | |
| 93 */ | |
| 94 SkStream* stream() { | |
| 95 return fStream.get(); | |
| 96 } | |
| 97 | |
| 87 private: | 98 private: |
| 88 const SkImageInfo fInfo; | 99 const SkImageInfo fInfo; |
| 89 SkAutoTDelete<SkStream> fStream; | 100 SkAutoTDelete<SkStream> fStream; |
| 90 bool fNeedsRewind; | 101 bool fNeedsRewind; |
| 91 }; | 102 }; |
| 92 #endif // SkCodec_DEFINED | 103 #endif // SkCodec_DEFINED |
| OLD | NEW |