Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: include/core/SkCanvas.h

Issue 2309483002: WIP RasterCanvasLayerAllocator experiment 2
Patch Set: vend smart pointers to SkCanvas Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index d28d0f18982292a0c4294cd032db3590ad4cad50..5e7ca1f4df775a507e9b3222082236cf2a072e33 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"
@@ -102,6 +103,8 @@ public:
*/
explicit SkCanvas(SkBaseDevice* device);
+ explicit SkCanvas(SkBaseDevice* device, 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;
+
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698