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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 1365563002: Make channel preemption not require view contexts for hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wakeup_gpu
Patch Set: rebase Created 5 years, 3 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/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;
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/compositor/image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698