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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 class SK_API SkStreamMemory : public SkStreamAsset { | 163 class SK_API SkStreamMemory : public SkStreamAsset { |
164 public: | 164 public: |
165 SkStreamMemory* duplicate() const SK_OVERRIDE = 0; | 165 SkStreamMemory* duplicate() const SK_OVERRIDE = 0; |
166 SkStreamMemory* fork() const SK_OVERRIDE = 0; | 166 SkStreamMemory* fork() const SK_OVERRIDE = 0; |
167 | 167 |
168 const void* getMemoryBase() SK_OVERRIDE = 0; | 168 const void* getMemoryBase() SK_OVERRIDE = 0; |
169 }; | 169 }; |
170 | 170 |
171 class SK_API SkWStream : SkNoncopyable { | 171 class SK_API SkWStream : SkNoncopyable { |
172 public: | 172 public: |
173 SK_DECLARE_INST_COUNT_ROOT(SkWStream) | 173 SK_DECLARE_INST_COUNT(SkWStream) |
174 | 174 |
175 virtual ~SkWStream(); | 175 virtual ~SkWStream(); |
176 | 176 |
177 /** Called to write bytes to a SkWStream. Returns true on success | 177 /** Called to write bytes to a SkWStream. Returns true on success |
178 @param buffer the address of at least size bytes to be written to the st
ream | 178 @param buffer the address of at least size bytes to be written to the st
ream |
179 @param size The number of bytes in buffer to write to the stream | 179 @param size The number of bytes in buffer to write to the stream |
180 @return true on success | 180 @return true on success |
181 */ | 181 */ |
182 virtual bool write(const void* buffer, size_t size) = 0; | 182 virtual bool write(const void* buffer, size_t size) = 0; |
183 virtual void newline(); | 183 virtual void newline(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 440 |
441 private: | 441 private: |
442 size_t fBytesWritten; | 442 size_t fBytesWritten; |
443 typedef SkWStream INHERITED; | 443 typedef SkWStream INHERITED; |
444 }; | 444 }; |
445 | 445 |
446 // for now | 446 // for now |
447 typedef SkFILEStream SkURLStream; | 447 typedef SkFILEStream SkURLStream; |
448 | 448 |
449 #endif | 449 #endif |
OLD | NEW |