| 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 1af8acddf2f52bebd54a77a27337dfe8e441fa45..b7ed84406a3a9d635384ddda1e3765b703764d6b 100644
|
| --- a/content/browser/compositor/gpu_process_transport_factory.cc
|
| +++ b/content/browser/compositor/gpu_process_transport_factory.cc
|
| @@ -448,14 +448,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 =
|
| @@ -570,8 +562,17 @@ GpuProcessTransportFactory::CreatePerCompositorData(
|
| data->surface_id = 0;
|
| } else {
|
| data->surface_id = tracker->AddSurfaceForNativeWidget(widget);
|
| +#if defined(OS_MACOSX) || defined(OS_ANDROID)
|
| + // On Mac and Android, 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 on the GPU side or 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;
|
|
|