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

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

Issue 654223006: Cleanup GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style nits Created 6 years, 1 month 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_mac.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
index e0fe58da0e9ff250f638ef491408b9da9b1598df..33a5e0b377f78527eb2528195ca342d5f0b69e3b 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
@@ -57,7 +57,23 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
void GpuMemoryBufferImpl::DeletedByChildProcess(
gfx::GpuMemoryBufferType type,
const gfx::GpuMemoryBufferId& id,
- base::ProcessHandle child_process) {
+ base::ProcessHandle child_process,
+ int child_client_id,
+ uint32 sync_point) {
+ switch (type) {
+ case gfx::SHARED_MEMORY_BUFFER:
+ break;
+ case gfx::IO_SURFACE_BUFFER:
+ if (id.secondary_id != child_client_id) {
+ LOG(ERROR)
+ << "Child attempting to delete GpuMemoryBuffer it does not own";
+ } else {
+ GpuMemoryBufferImplIOSurface::DeletedByChildProcess(id, sync_point);
+ }
+ break;
+ default:
+ NOTREACHED();
+ }
}
// static
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_linux.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698