Chromium Code Reviews| Index: src/core/SkBlitter.h |
| diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h |
| index 0f1006fcfb70909e640f47b735771dea1b796e5a..8d7df76842d8c254d55c00779d204ed3abc51ee9 100644 |
| --- a/src/core/SkBlitter.h |
| +++ b/src/core/SkBlitter.h |
| @@ -25,6 +25,7 @@ |
| */ |
| class SkBlitter { |
| public: |
| + SkBlitter() : fBlitMemory(NULL) { } |
| virtual ~SkBlitter(); |
| /// Blit a horizontal run of one or more pixels. |
| @@ -76,6 +77,14 @@ public: |
| */ |
| virtual int requestRowsPreserved() const { return 1; } |
| + /** |
| + * This function allocates memory for the blitter that the blitter then owns. |
| + * The memory can be used by the calling function at will, but it will be |
| + * released when the blitter's destructor is called. This function returns |
| + * NULL if no persistent memory is needed by the blitter. |
| + */ |
| + void* allocBlitMemory(size_t); |
| + |
| ///@name non-virtual helpers |
| void blitMaskRegion(const SkMask& mask, const SkRegion& clip); |
| void blitRectRegion(const SkIRect& rect, const SkRegion& clip); |
| @@ -98,6 +107,10 @@ public: |
| SkTBlitterAllocator*); |
| ///@} |
| +protected: |
| + |
|
robertphillips
2014/07/21 15:14:59
What do you think about using SkAutoMalloc for thi
krajcevski
2014/07/21 15:47:40
Done.
|
| + void* fBlitMemory; |
| + |
| private: |
| }; |