Chromium Code Reviews| Index: content/browser/compositor/gpu_process_transport_factory.cc |
| diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc |
| index a5b14336ab766d262cf57c47b317d497ab7b1980..6ad21d8881f9fafa1beff0ddbb7f9f6a798b0c58 100644 |
| --- a/content/browser/compositor/gpu_process_transport_factory.cc |
| +++ b/content/browser/compositor/gpu_process_transport_factory.cc |
| @@ -442,14 +442,6 @@ ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { |
| return this; |
| } |
| -gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() { |
| - gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( |
| - gfx::kNullPluginWindow, gfx::NULL_TRANSPORT); |
| - handle.parent_client_id = |
| - BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); |
| - return handle; |
| -} |
| - |
| scoped_ptr<cc::SurfaceIdAllocator> |
| GpuProcessTransportFactory::CreateSurfaceIdAllocator() { |
| scoped_ptr<cc::SurfaceIdAllocator> allocator = |
| @@ -564,8 +556,17 @@ GpuProcessTransportFactory::CreatePerCompositorData( |
| data->surface_id = 0; |
| } else { |
| data->surface_id = tracker->AddSurfaceForNativeWidget(widget); |
| +#if defined(OS_MACOSX) |
|
no sievers
2015/09/23 21:53:21
While you're at it and are cleaning up the types,
piman
2015/09/23 23:33:37
Yes, good point, done.
|
| + // On Mac, we can't pass the AcceleratedWidget, which is process-local, so |
| + // instead we pass the surface_id, so that we can look up the |
| + // AcceleratedWidget when we receive |
| + // GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params. |
| + gfx::PluginWindowHandle handle = data->surface_id; |
| +#else |
| + gfx::PluginWindowHandle handle = widget; |
| +#endif |
| tracker->SetSurfaceHandle(data->surface_id, |
| - gfx::GLSurfaceHandle(widget, gfx::NATIVE_DIRECT)); |
| + gfx::GLSurfaceHandle(handle, gfx::NATIVE_DIRECT)); |
| } |
| per_compositor_data_[compositor] = data; |