Chromium Code Reviews| Index: include/core/SkCanvas.h |
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
| index d28d0f18982292a0c4294cd032db3590ad4cad50..599bafcc7990644615c52524d17c48441dddbfaf 100644 |
| --- a/include/core/SkCanvas.h |
| +++ b/include/core/SkCanvas.h |
| @@ -13,6 +13,7 @@ |
| #include "SkDeque.h" |
| #include "SkImage.h" |
| #include "SkPaint.h" |
| +#include "SkRasterCanvasLayerAllocator.h" |
| #include "SkRefCnt.h" |
| #include "SkRegion.h" |
| #include "SkSurfaceProps.h" |
| @@ -108,6 +109,8 @@ public: |
| */ |
| explicit SkCanvas(const SkBitmap& bitmap); |
| + SkCanvas(const SkBitmap& bitmap, SkRasterCanvasLayerAllocator*); |
| + |
| /** Construct a canvas with the specified bitmap to draw into. |
| @param bitmap Specifies a bitmap for the canvas to draw into. Its |
| structure are copied to the canvas. |
| @@ -132,6 +135,8 @@ public: |
| */ |
| bool getProps(SkSurfaceProps*) const; |
| + SkRasterCanvasLayerAllocator* getLayerAllocator() const { return fLayerAllocator.get(); } |
| + |
| /////////////////////////////////////////////////////////////////////////// |
| /** |
| @@ -1689,6 +1694,8 @@ private: |
| void validateClip() const {} |
| #endif |
| + std::unique_ptr<SkRasterCanvasLayerAllocator> fLayerAllocator; |
|
reed1
2016/09/16 13:15:00
Why is the type SkRefCnt, but we have a unique_ptr
tomhudson
2016/09/28 21:23:57
Done.
|
| + |
| typedef SkRefCnt INHERITED; |
| }; |