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

Unified Diff: include/core/SkCanvas.h

Issue 2309483002: WIP RasterCanvasLayerAllocator experiment 2
Patch Set: support initial data? 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
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;
};

Powered by Google App Engine
This is Rietveld 408576698