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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 9958100: Unobfuscate RWHVMac accelerated compositing code path by separating it from plugin code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 9 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/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index eda47e1ddd433da04a86e57279e654ad8e736593..9d6ef6435607d7d3b8d3bea6f29969fe5977be8a 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -199,7 +199,7 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
#endif
-#if defined(OS_MACOSX) || defined(USE_AURA)
+#if defined(USE_AURA)
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew,
OnAcceleratedSurfaceNew)
#endif
@@ -280,7 +280,7 @@ void GpuProcessHostUIShim::OnResizeView(int32 surface_id,
#endif
-#if defined(OS_MACOSX) || defined(USE_AURA)
+#if defined(USE_AURA)
void GpuProcessHostUIShim::OnAcceleratedSurfaceNew(
const GpuHostMsg_AcceleratedSurfaceNew_Params& params) {
@@ -299,37 +299,8 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceNew(
uint64 surface_handle = params.surface_handle;
TransportDIB::Handle shm_handle = TransportDIB::DefaultHandleValue();
-#if defined(OS_MACOSX)
- if (params.create_transport_dib) {
- scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory());
- if (shared_memory->CreateAnonymous(params.width * params.height * 4)) {
- // Create a local handle for RWHVMac to map the SHM.
- TransportDIB::Handle local_handle;
- if (!shared_memory->ShareToProcess(0 /* pid, not needed */,
- &local_handle)) {
- return;
- } else {
- view->AcceleratedSurfaceSetTransportDIB(params.window,
- params.width,
- params.height,
- local_handle);
- // Create a remote handle for the GPU process to map the SHM.
- if (!shared_memory->ShareToProcess(0 /* pid, not needed */,
- &shm_handle)) {
- return;
- }
- }
- }
- } else {
- view->AcceleratedSurfaceSetIOSurface(params.window,
- params.width,
- params.height,
- surface_handle);
- }
-#else // defined(USE_AURA)
view->AcceleratedSurfaceNew(
params.width, params.height, &surface_handle, &shm_handle);
-#endif
delayed_send.Cancel();
Send(new AcceleratedSurfaceMsg_NewACK(
params.route_id, surface_handle, shm_handle));

Powered by Google App Engine
This is Rietveld 408576698