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

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: fix build and broken 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 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;

Powered by Google App Engine
This is Rietveld 408576698