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

Unified Diff: include/core/SkCanvas.h

Issue 1763143002: WIP RasterCanvasLayerAllocator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add allocator-constancy sanitycheck Created 4 years, 9 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 95a5244da61d28aaa1781655a519d22c77958076..2ba5dae49b513a4b1d5738e151878aec6a02dfa4 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -32,6 +32,7 @@ class SkMetaData;
class SkPath;
class SkPicture;
class SkPixmap;
+class SkRasterCanvasLayerAllocator;
class SkRRect;
struct SkRSXform;
class SkSurface;
@@ -1193,6 +1194,12 @@ public:
*/
void replayClips(ClipVisitor*) const;
+ /**
+ * Returns any OS-specific native context backing this SkCanvas,
+ * or nullptr.
+ */
+ void* getTopLayerNative() const;
+
///////////////////////////////////////////////////////////////////////////
/** After calling saveLayer(), there can be any number of devices that make
@@ -1381,7 +1388,7 @@ private:
enum {
kMCRecSize = 128, // most recent measurement
kMCRecCount = 32, // common depth for save/restores
- kDeviceCMSize = 136, // most recent measurement
+ kDeviceCMSize = 152, // most recent measurement
};
intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)];
intptr_t fDeviceCMStorage[kDeviceCMSize / sizeof(intptr_t)];
@@ -1509,6 +1516,8 @@ private:
void validateClip() const {}
#endif
+ SkRasterCanvasLayerAllocator* fAllocator;
reed1 2016/05/11 18:58:24 I presume we'll add a constructor that takes an al
tomhudson 2016/05/26 16:36:16 With the next patchset, I'm proposing a factory on
+
typedef SkRefCnt INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698