OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkStream_DEFINED | 8 #ifndef SkStream_DEFINED |
9 #define SkStream_DEFINED | 9 #define SkStream_DEFINED |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 SkScalar readScalar(); | 89 SkScalar readScalar(); |
90 size_t readPackedUInt(); | 90 size_t readPackedUInt(); |
91 | 91 |
92 /** | 92 /** |
93 * Reconstitute an SkData object that was written to the stream | 93 * Reconstitute an SkData object that was written to the stream |
94 * using SkWStream::writeData(). | 94 * using SkWStream::writeData(). |
95 */ | 95 */ |
96 SkData* readData(); | 96 SkData* readData(); |
97 | 97 |
98 //SkStreamRewindable | 98 //SkStreamRewindable |
99 /** Rewinds to the beginning of the stream. If this cannot be done, return f alse. */ | 99 /** Rewinds to the beginning of the stream. The current position is not affe cted |
100 * when false is returned. | |
101 * | |
102 * Returns false iff after this call one of the following is true: | |
103 * * The stream is known to be somewhere other than the beginning. | |
104 * * It is unknown whether the stream is at the beginning. | |
reed1
2013/08/27 20:00:37
Are both of these iff clauses true at the same tim
scroggo
2013/08/27 20:12:56
No. An implementation could return false if the st
| |
105 */ | |
100 virtual bool rewind() { return false; } | 106 virtual bool rewind() { return false; } |
101 | 107 |
102 /** Duplicates this stream. If this cannot be done, returns NULL. | 108 /** Duplicates this stream. If this cannot be done, returns NULL. |
103 * The returned stream will be positioned at the beginning of its data. | 109 * The returned stream will be positioned at the beginning of its data. |
104 */ | 110 */ |
105 virtual SkStreamRewindable* duplicate() const { return NULL; } | 111 virtual SkStreamRewindable* duplicate() const { return NULL; } |
106 | 112 |
107 //SkStreamSeekable | 113 //SkStreamSeekable |
108 /** Returns true if this stream can report it's current position. */ | 114 /** Returns true if this stream can report it's current position. */ |
109 virtual bool hasPosition() const { return false; } | 115 virtual bool hasPosition() const { return false; } |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 virtual void newline() SK_OVERRIDE; | 464 virtual void newline() SK_OVERRIDE; |
459 | 465 |
460 private: | 466 private: |
461 typedef SkWStream INHERITED; | 467 typedef SkWStream INHERITED; |
462 }; | 468 }; |
463 | 469 |
464 // for now | 470 // for now |
465 typedef SkFILEStream SkURLStream; | 471 typedef SkFILEStream SkURLStream; |
466 | 472 |
467 #endif | 473 #endif |
OLD | NEW |