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

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

Issue 654223006: Cleanup GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile 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_channel_host.cc
diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
index 2d25b4940f491530e767f80893bf4cee5b79f78c..263a94524bc3326eac9241c77091fc3a662d4790 100644
--- a/content/common/gpu/client/gpu_channel_host.cc
+++ b/content/common/gpu/client/gpu_channel_host.cc
@@ -281,32 +281,40 @@ int32 GpuChannelHost::ReserveTransferBufferId() {
}
gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess(
- gfx::GpuMemoryBufferHandle source_handle) {
+ gfx::GpuMemoryBufferHandle source_handle,
+ bool* requires_sync_point) {
+ DCHECK(requires_sync_point);
reveman 2014/11/03 22:26:12 nit: I think this DCHECK is overkill
switch (source_handle.type) {
case gfx::SHARED_MEMORY_BUFFER: {
gfx::GpuMemoryBufferHandle handle;
handle.type = gfx::SHARED_MEMORY_BUFFER;
handle.handle = ShareToGpuProcess(source_handle.handle);
+ *requires_sync_point = false;
return handle;
}
#if defined(USE_OZONE)
case gfx::OZONE_NATIVE_BUFFER:
+ *requires_sync_point = true;
return source_handle;
#endif
#if defined(OS_MACOSX)
case gfx::IO_SURFACE_BUFFER:
+ *requires_sync_point = true;
return source_handle;
#endif
#if defined(OS_ANDROID)
case gfx::SURFACE_TEXTURE_BUFFER:
+ *requires_sync_point = true;
return source_handle;
#endif
#if defined(USE_X11)
case gfx::X11_PIXMAP_BUFFER:
+ *requires_sync_point = true;
return source_handle;
#endif
default:
NOTREACHED();
+ *requires_sync_point = false;
reveman 2014/11/03 22:26:12 nit: I don't think you should set requires_sync_po
return gfx::GpuMemoryBufferHandle();
}
}

Powered by Google App Engine
This is Rietveld 408576698