Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkStreamPriv_DEFINED | 8 #ifndef SkStreamPriv_DEFINED |
| 9 #define SkStreamPriv_DEFINED | 9 #define SkStreamPriv_DEFINED |
| 10 | 10 |
| 11 class SkAutoMalloc; | 11 class SkAutoMalloc; |
| 12 class SkDynamicMemoryWStream; | |
| 12 class SkStream; | 13 class SkStream; |
| 13 class SkStreamRewindable; | 14 class SkStreamRewindable; |
| 14 class SkData; | 15 class SkData; |
| 15 | 16 |
| 16 /** | 17 /** |
| 17 * Copy the provided stream to memory allocated by storage. | 18 * Copy the provided stream to memory allocated by storage. |
| 18 * Used by SkImageDecoder_libbmp and SkImageDecoder_libico. | 19 * Used by SkImageDecoder_libbmp and SkImageDecoder_libico. |
| 19 * @param storage Allocator to hold the memory. Will be reset to be large | 20 * @param storage Allocator to hold the memory. Will be reset to be large |
| 20 * enough to hold the entire stream. Upon successful return, | 21 * enough to hold the entire stream. Upon successful return, |
| 21 * storage->get() will point to data holding the SkStream's entire | 22 * storage->get() will point to data holding the SkStream's entire |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 41 * otherwise allocating memory for a copy). The position of the | 42 * otherwise allocating memory for a copy). The position of the |
| 42 * input stream is left in an indeterminate state. | 43 * input stream is left in an indeterminate state. |
| 43 */ | 44 */ |
| 44 SkStreamRewindable* SkStreamRewindableFromSkStream(SkStream* stream); | 45 SkStreamRewindable* SkStreamRewindableFromSkStream(SkStream* stream); |
| 45 | 46 |
| 46 /** | 47 /** |
| 47 * Copies the input stream from the current position to the end. | 48 * Copies the input stream from the current position to the end. |
| 48 * Does not rewind the input stream. | 49 * Does not rewind the input stream. |
| 49 */ | 50 */ |
| 50 bool SkStreamCopy(SkWStream* out, SkStream* input); | 51 bool SkStreamCopy(SkWStream* out, SkStream* input); |
| 52 bool SkStreamCopyToDynamicMemoryW(SkDynamicMemoryWStream* out, SkStream* input); | |
|
scroggo
2016/01/11 17:44:02
Reviewing this has forced me to take a long hard l
yujieqin
2016/01/13 15:29:41
reverted.
| |
| 51 | 53 |
| 52 #endif // SkStreamPriv_DEFINED | 54 #endif // SkStreamPriv_DEFINED |
| OLD | NEW |