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

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

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 f03eb9e526224b2b266a847259ad6e471a7dbe26..fcb0a3e8abbb6ad1aefafb3486866c28e8c03371 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -237,13 +237,6 @@
scoped_refptr<ContextProviderCommandBuffer> context_provider;
if (create_gpu_output_surface) {
- // Try to reuse existing worker context provider.
- if (shared_worker_context_provider_) {
- base::AutoLock lock(*shared_worker_context_provider_->GetLock());
- if (shared_worker_context_provider_->ContextGL()
- ->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
- shared_worker_context_provider_ = nullptr;
- }
scoped_refptr<GpuChannelHost> gpu_channel_host =
BrowserGpuChannelHostFactory::instance()->GetGpuChannel();
if (gpu_channel_host.get()) {
@@ -253,24 +246,12 @@
BROWSER_COMPOSITOR_ONSCREEN_CONTEXT);
if (context_provider && !context_provider->BindToCurrentThread())
context_provider = nullptr;
- if (!shared_worker_context_provider_) {
- shared_worker_context_provider_ = ContextProviderCommandBuffer::Create(
- GpuProcessTransportFactory::CreateContextCommon(gpu_channel_host,
- 0),
- BROWSER_WORKER_CONTEXT);
- if (shared_worker_context_provider_ &&
- !shared_worker_context_provider_->BindToCurrentThread())
- shared_worker_context_provider_ = nullptr;
- }
}
- bool created_gpu_browser_compositor =
- !!context_provider && !!shared_worker_context_provider_;
-
UMA_HISTOGRAM_BOOLEAN("Aura.CreatedGpuBrowserCompositor",
- created_gpu_browser_compositor);
-
- if (!created_gpu_browser_compositor) {
+ !!context_provider.get());
+
+ if (!context_provider) {
// Try again.
CauseForGpuLaunch cause =
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE;
@@ -293,8 +274,7 @@
context_provider->ContextCapabilities();
if (!data->surface_id) {
surface = make_scoped_ptr(new OffscreenBrowserCompositorOutputSurface(
- context_provider, shared_worker_context_provider_,
- compositor->vsync_manager(),
+ context_provider, compositor->vsync_manager(),
scoped_ptr<BrowserCompositorOverlayCandidateValidator>()));
} else if (capabilities.gpu.surfaceless) {
GLenum target = GL_TEXTURE_2D;
@@ -305,15 +285,13 @@
#endif
surface =
make_scoped_ptr(new GpuSurfacelessBrowserCompositorOutputSurface(
- context_provider, shared_worker_context_provider_,
- data->surface_id, compositor->vsync_manager(),
+ context_provider, data->surface_id, compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget()), target,
format, BrowserGpuMemoryBufferManager::current()));
} else {
if (!surface) {
surface = make_scoped_ptr(new GpuBrowserCompositorOutputSurface(
- context_provider, shared_worker_context_provider_,
- compositor->vsync_manager(),
+ context_provider, compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget())));
}
}
@@ -344,8 +322,7 @@
scoped_ptr<cc::SurfaceDisplayOutputSurface> output_surface(
new cc::SurfaceDisplayOutputSurface(
- manager, compositor->surface_id_allocator(), context_provider,
- shared_worker_context_provider_));
+ manager, compositor->surface_id_allocator(), 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