Chromium Code Reviews| Index: include/core/SkStream.h |
| diff --git a/include/core/SkStream.h b/include/core/SkStream.h |
| index 50ed691e5ae4b0e26a882850141b60aa1bba1cca..d2eff2cb48c9ed1eb052b2ef1acd05b8cac9c7be 100644 |
| --- a/include/core/SkStream.h |
| +++ b/include/core/SkStream.h |
| @@ -126,6 +126,11 @@ public: |
| virtual bool hasLength() const { return false; } |
| /** Returns the total length of the stream. If this cannot be done, returns 0. */ |
| virtual size_t getLength() const { return 0; } |
| + /** Returns a ref to the data, if it can be created |
| + inexpensively. If non-null is returned, the caller is |
| + responsible for calling unref() on the data when it is |
| + finished. */ |
| + virtual SkData* getData() const { return NULL; } |
|
bungeman-skia
2013/12/05 21:03:44
I would put this down with SkStreamMemory, replaci
hal.canary
2013/12/05 22:29:29
Done.
|
| //SkStreamMemory |
| /** Returns the starting address for the data. If this cannot be done, returns NULL. */ |
| @@ -269,6 +274,7 @@ public: |
| virtual size_t getLength() const SK_OVERRIDE; |
| + virtual SkData* getData() const SK_OVERRIDE; |
| virtual const void* getMemoryBase() SK_OVERRIDE; |
| private: |
| @@ -341,6 +347,7 @@ public: |
| virtual size_t getLength() const SK_OVERRIDE; |
| + virtual SkData* getData() const SK_OVERRIDE; |
| virtual const void* getMemoryBase() SK_OVERRIDE; |
| private: |