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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl.cc

Issue 600693002: content: Cleanup GpuMemoryBufferImpl destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove scoped_refptr<> from sender param of DeletedGpuMemoryBuffer Created 6 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: content/common/gpu/client/gpu_memory_buffer_impl.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.cc b/content/common/gpu/client/gpu_memory_buffer_impl.cc
index b3cd98332b41d82eecec0e17434bfb01d865a78d..00a94818b732c971a84deebec29e02612ad35050 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc
@@ -9,12 +9,18 @@
namespace content {
GpuMemoryBufferImpl::GpuMemoryBufferImpl(const gfx::Size& size,
- unsigned internalformat)
- : size_(size), internalformat_(internalformat), mapped_(false) {
+ unsigned internalformat,
+ const DestructionCallback& callback)
+ : size_(size),
+ internalformat_(internalformat),
+ callback_(callback),
+ mapped_(false) {
DCHECK(IsFormatValid(internalformat));
}
-GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {}
+GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {
+ callback_.Run();
+}
// static
bool GpuMemoryBufferImpl::IsFormatValid(unsigned internalformat) {
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698