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

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

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits and use best_resource_format for now Created 5 years, 5 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 a6d18220786b8454cdf8339c2d339b8b2b3c7a5f..2b3a52f0aa027e66e4076df6f5d08d8a41db8a06 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -263,6 +263,11 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
}
}
+ scoped_refptr<ContextProviderCommandBuffer> worker_context_provider(
+ ContextProviderCommandBuffer::Create(
+ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext(),
+ BROWSER_WORKER_CONTEXT));
piman 2015/07/23 20:44:52 Can you move this into the else block below, so th
reveman 2015/07/24 17:49:15 Done. Added a shared worker context provider to la
+
scoped_ptr<BrowserCompositorOutputSurface> surface;
if (!create_gpu_output_surface) {
surface = make_scoped_ptr(new SoftwareBrowserCompositorOutputSurface(
@@ -279,12 +284,14 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
} else if (capabilities.gpu.surfaceless) {
surface =
make_scoped_ptr(new GpuSurfacelessBrowserCompositorOutputSurface(
- context_provider, data->surface_id, compositor->vsync_manager(),
+ context_provider, worker_context_provider, data->surface_id,
+ compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget()),
GL_TEXTURE_2D, GL_RGB, BrowserGpuMemoryBufferManager::current()));
} else {
surface = make_scoped_ptr(new GpuBrowserCompositorOutputSurface(
- context_provider, compositor->vsync_manager(),
+ context_provider, worker_context_provider,
+ compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget())));
}
}
@@ -314,7 +321,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
scoped_ptr<cc::SurfaceDisplayOutputSurface> output_surface(
new cc::SurfaceDisplayOutputSurface(
- manager, compositor->surface_id_allocator(), context_provider));
+ manager, compositor->surface_id_allocator(), context_provider,
+ worker_context_provider));
display_client->set_surface_output_surface(output_surface.get());
output_surface->set_display_client(display_client.get());
display_client->display()->Resize(compositor->size());

Powered by Google App Engine
This is Rietveld 408576698