Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: include/core/SkStream.h

Issue 22861028: Handle SkStream::rewind properly. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Another comment rewrite. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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. Returns true if the stream is kn own
100 * to be at the beginning after this call returns.
101 */
100 virtual bool rewind() { return false; } 102 virtual bool rewind() { return false; }
101 103
102 /** Duplicates this stream. If this cannot be done, returns NULL. 104 /** Duplicates this stream. If this cannot be done, returns NULL.
103 * The returned stream will be positioned at the beginning of its data. 105 * The returned stream will be positioned at the beginning of its data.
104 */ 106 */
105 virtual SkStreamRewindable* duplicate() const { return NULL; } 107 virtual SkStreamRewindable* duplicate() const { return NULL; }
106 108
107 //SkStreamSeekable 109 //SkStreamSeekable
108 /** Returns true if this stream can report it's current position. */ 110 /** Returns true if this stream can report it's current position. */
109 virtual bool hasPosition() const { return false; } 111 virtual bool hasPosition() const { return false; }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 virtual void newline() SK_OVERRIDE; 460 virtual void newline() SK_OVERRIDE;
459 461
460 private: 462 private:
461 typedef SkWStream INHERITED; 463 typedef SkWStream INHERITED;
462 }; 464 };
463 465
464 // for now 466 // for now
465 typedef SkFILEStream SkURLStream; 467 typedef SkFILEStream SkURLStream;
466 468
467 #endif 469 #endif
OLDNEW
« no previous file with comments | « no previous file | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698