| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // copy what has been written to the stream into dst | 420 // copy what has been written to the stream into dst |
| 421 void copyTo(void* dst) const; | 421 void copyTo(void* dst) const; |
| 422 | 422 |
| 423 /** | 423 /** |
| 424 * Return a copy of the data written so far. This call is responsible for | 424 * Return a copy of the data written so far. This call is responsible for |
| 425 * calling unref() when they are finished with the data. | 425 * calling unref() when they are finished with the data. |
| 426 */ | 426 */ |
| 427 SkData* copyToData() const; | 427 SkData* copyToData() const; |
| 428 | 428 |
| 429 /** Reset, returning a reader stream with the current content. */ | 429 /** Reset, returning a reader stream with the current content. */ |
| 430 SkStreamAsset* detatchAsStream(); | 430 SkStreamAsset* detachAsStream(); |
| 431 | 431 |
| 432 /** Reset the stream to its original, empty, state. */ | 432 /** Reset the stream to its original, empty, state. */ |
| 433 void reset(); | 433 void reset(); |
| 434 void padToAlign4(); | 434 void padToAlign4(); |
| 435 private: | 435 private: |
| 436 struct Block; | 436 struct Block; |
| 437 Block* fHead; | 437 Block* fHead; |
| 438 Block* fTail; | 438 Block* fTail; |
| 439 size_t fBytesWritten; | 439 size_t fBytesWritten; |
| 440 mutable SkData* fCopy; // is invalidated if we write after it is created | 440 mutable SkData* fCopy; // is invalidated if we write after it is created |
| (...skipping 17 matching lines...) Expand all Loading... |
| 458 virtual void newline() SK_OVERRIDE; | 458 virtual void newline() SK_OVERRIDE; |
| 459 | 459 |
| 460 private: | 460 private: |
| 461 typedef SkWStream INHERITED; | 461 typedef SkWStream INHERITED; |
| 462 }; | 462 }; |
| 463 | 463 |
| 464 // for now | 464 // for now |
| 465 typedef SkFILEStream SkURLStream; | 465 typedef SkFILEStream SkURLStream; |
| 466 | 466 |
| 467 #endif | 467 #endif |
| OLD | NEW |