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

Unified Diff: src/core/SkManagedBitmapDevice.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 | « src/core/SkCanvas.cpp ('k') | src/core/SkManagedBitmapDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkManagedBitmapDevice.h
diff --git a/src/core/SkManagedBitmapDevice.h b/src/core/SkManagedBitmapDevice.h
new file mode 100644
index 0000000000000000000000000000000000000000..af0196ba14ba974e4a6c525490f1dc26b09fe7c9
--- /dev/null
+++ b/src/core/SkManagedBitmapDevice.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkManagedBitmapDevice_DEFINED
+#define SkManagedBitmapDevice_DEFINED
+
+#include "SkBitmapDevice.h"
+
+class SkBitmap;
+class SkSurfaceProps;
+
+/**
+ * A BitmapDevice whose raster backing is managed by the OS or some external
+ * library.
+ */
+
+class SkManagedBitmapDevice : public SkBitmapDevice {
+public:
+ SkManagedBitmapDevice(const SkBitmap& bitmap,
+ const SkSurfaceProps& surfaceProps,
+ void (*deallocator) (void*),
+ void* deallocatorPayload);
+
+ ~SkManagedBitmapDevice() override;
+private:
+
+ /// An implementation-dependent function to call when releasing
+ /// the raster backing.
+ void (*fDeallocator)(void* payload);
+
+ void* fDeallocatorPayload;
+
+ typedef SkBitmapDevice INHERITED;
+};
+
+#endif // SkManagedBitmapDevice_DEFINED
+
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkManagedBitmapDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698