| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 public: | 353 public: |
| 354 SkFILEWStream(const char path[]); | 354 SkFILEWStream(const char path[]); |
| 355 virtual ~SkFILEWStream(); | 355 virtual ~SkFILEWStream(); |
| 356 | 356 |
| 357 /** Returns true if the current path could be opened. | 357 /** Returns true if the current path could be opened. |
| 358 */ | 358 */ |
| 359 bool isValid() const { return fFILE != NULL; } | 359 bool isValid() const { return fFILE != NULL; } |
| 360 | 360 |
| 361 bool write(const void* buffer, size_t size) override; | 361 bool write(const void* buffer, size_t size) override; |
| 362 void flush() override; | 362 void flush() override; |
| 363 void fsync(); |
| 363 size_t bytesWritten() const override; | 364 size_t bytesWritten() const override; |
| 364 | 365 |
| 365 private: | 366 private: |
| 366 FILE* fFILE; | 367 FILE* fFILE; |
| 367 | 368 |
| 368 typedef SkWStream INHERITED; | 369 typedef SkWStream INHERITED; |
| 369 }; | 370 }; |
| 370 | 371 |
| 371 class SkMemoryWStream : public SkWStream { | 372 class SkMemoryWStream : public SkWStream { |
| 372 public: | 373 public: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 440 |
| 440 private: | 441 private: |
| 441 size_t fBytesWritten; | 442 size_t fBytesWritten; |
| 442 typedef SkWStream INHERITED; | 443 typedef SkWStream INHERITED; |
| 443 }; | 444 }; |
| 444 | 445 |
| 445 // for now | 446 // for now |
| 446 typedef SkFILEStream SkURLStream; | 447 typedef SkFILEStream SkURLStream; |
| 447 | 448 |
| 448 #endif | 449 #endif |
| OLD | NEW |