diff options
author | Derek Sollenberger <djsollen@google.com> | 2011-01-07 13:32:14 -0500 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2011-02-23 14:59:05 -0500 |
commit | 40528743dbb9ce7f39f093e0cdc47849ac8887cf (patch) | |
tree | 9f27d91d1210746846b76e2ab85a82258243fe1f /include/core/SkStream.h | |
parent | dd3f189dfde60f95f6be0517f1c28ad2879973a1 (diff) | |
download | external_skia-40528743dbb9ce7f39f093e0cdc47849ac8887cf.zip external_skia-40528743dbb9ce7f39f093e0cdc47849ac8887cf.tar.gz external_skia-40528743dbb9ce7f39f093e0cdc47849ac8887cf.tar.bz2 |
Skia Merge (revision 808)
This merge has companion changes in the following projects in order
to be compatible with changes to skia interfaces and practices:
1. /frameworks/base
2. /external/webkit
Change-Id: I54092971305579e81a8fdb27bbe04ec340792e3b
Diffstat (limited to 'include/core/SkStream.h')
-rw-r--r-- | include/core/SkStream.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/core/SkStream.h b/include/core/SkStream.h index 798c6be..b02d482 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -91,6 +91,7 @@ public: bool writeText(const char text[]); bool writeDecAsText(int32_t); + bool writeBigDecAsText(int64_t, int minDigits = 0); bool writeHexAsText(uint32_t, int minDigits = 0); bool writeScalarAsText(SkScalar); @@ -176,7 +177,11 @@ public: */ virtual void setMemory(const void* data, size_t length, bool copyData = false); - virtual void setMemoryOwned(const void* src, size_t size); + /** Replace any memory buffer with the specified buffer. The caller + must have allocated data with sk_malloc or sk_realloc, since it + will be freed with sk_free. + */ + void setMemoryOwned(const void* data, size_t length); void skipToAlign4(); virtual bool rewind(); virtual size_t read(void* buffer, size_t size); @@ -273,7 +278,7 @@ public: // modifies stream and returns true if offset + size is less than or equal to getOffset() bool write(const void* buffer, size_t offset, size_t size); bool read(void* buffer, size_t offset, size_t size); - size_t getOffset() { return fBytesWritten; } + size_t getOffset() const { return fBytesWritten; } // copy what has been written to the stream into dst void copyTo(void* dst) const; @@ -309,4 +314,3 @@ public: typedef SkFILEStream SkURLStream; #endif - |