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

Unified Diff: src/core/SkManagedBitmapDevice.cpp

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/SkManagedBitmapDevice.h ('k') | src/core/SkRasterCanvasLayerAllocator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkManagedBitmapDevice.cpp
diff --git a/src/core/SkManagedBitmapDevice.cpp b/src/core/SkManagedBitmapDevice.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..04f02937733d97015d6bf8a9ca191ad664ef5867
--- /dev/null
+++ b/src/core/SkManagedBitmapDevice.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkManagedBitmapDevice.h"
+
+SkManagedBitmapDevice::SkManagedBitmapDevice(const SkBitmap& bitmap,
+ const SkSurfaceProps& surfaceProps,
+ void (*deallocator) (void*),
+ void* deallocatorPayload) :
+ INHERITED(bitmap, surfaceProps),
+ fDeallocator(deallocator),
+ fDeallocatorPayload(deallocatorPayload) { }
+
+SkManagedBitmapDevice::~SkManagedBitmapDevice() {
+ if (fDeallocator) {
+ fDeallocator(fDeallocatorPayload);
+ }
+}
+
« no previous file with comments | « src/core/SkManagedBitmapDevice.h ('k') | src/core/SkRasterCanvasLayerAllocator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698