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

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

Issue 654223006: Cleanup GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/command_buffer_proxy_impl.cc
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index 9acf05a9b314b1c6b4362152804814b1d8354d4e..d878d12dab49c378cc9f358ed032ce944063272a 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -308,9 +308,10 @@ int32_t CommandBufferProxyImpl::CreateImage(ClientBuffer buffer,
int32 new_id = channel_->ReserveImageId();
+ gpu::GpuMemoryBufferManager* memory_buffer_manager =
+ channel_->gpu_memory_buffer_manager();
gfx::GpuMemoryBuffer* gpu_memory_buffer =
- channel_->gpu_memory_buffer_manager()->GpuMemoryBufferFromClientBuffer(
- buffer);
+ memory_buffer_manager->GpuMemoryBufferFromClientBuffer(buffer);
DCHECK(gpu_memory_buffer);
// This handle is owned by the GPU process and must be passed to it or it
@@ -331,6 +332,11 @@ int32_t CommandBufferProxyImpl::CreateImage(ClientBuffer buffer,
return -1;
}
+ if (memory_buffer_manager->NeedsDestructionSyncPoint(handle.type)) {
+ memory_buffer_manager->RecordDestructionSyncPoint(buffer,
+ InsertSyncPoint());
+ }
+
return new_id;
}

Powered by Google App Engine
This is Rietveld 408576698