Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 4a846ec43df25b2f0bd1c3582a9e8de6a7781b9e..3341a930d8e86eed6352e2be1d666dfa838fe567 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1807,12 +1807,13 @@ void LayerTreeHostImpl::ReleaseTreeResources() { |
void LayerTreeHostImpl::CreateAndSetRenderer( |
OutputSurface* output_surface, |
ResourceProvider* resource_provider, |
- bool skip_gl_renderer) { |
+ bool force_software_renderer) { |
DCHECK(!renderer_); |
- if (output_surface->capabilities().delegated_rendering) { |
+ if (output_surface->capabilities().delegated_rendering && |
+ !force_software_renderer) { |
renderer_ = DelegatingRenderer::Create( |
this, &settings_, output_surface, resource_provider); |
- } else if (output_surface->context_provider() && !skip_gl_renderer) { |
+ } else if (output_surface->context_provider() && !force_software_renderer) { |
renderer_ = GLRenderer::Create(this, |
&settings_, |
output_surface, |
@@ -1939,9 +1940,10 @@ bool LayerTreeHostImpl::InitializeRenderer( |
if (output_surface->capabilities().deferred_gl_initialization) |
EnforceZeroBudget(true); |
- bool skip_gl_renderer = false; |
+ bool force_software_renderer = |
+ output_surface->capabilities().deferred_gl_initialization; |
CreateAndSetRenderer( |
- output_surface.get(), resource_provider.get(), skip_gl_renderer); |
+ output_surface.get(), resource_provider.get(), force_software_renderer); |
transfer_buffer_memory_limit_ = |
GetMaxTransferBufferUsageBytes(output_surface->context_provider().get()); |
@@ -2009,9 +2011,9 @@ void LayerTreeHostImpl::DeferredInitialize() { |
resource_provider_->InitializeGL(); |
- bool skip_gl_renderer = false; |
+ bool force_software_renderer = false; |
CreateAndSetRenderer( |
- output_surface_.get(), resource_provider_.get(), skip_gl_renderer); |
+ output_surface_.get(), resource_provider_.get(), force_software_renderer); |
EnforceZeroBudget(false); |
client_->SetNeedsCommitOnImplThread(); |
@@ -2031,9 +2033,9 @@ void LayerTreeHostImpl::ReleaseGL() { |
staging_resource_pool_.reset(); |
resource_provider_->InitializeSoftware(); |
- bool skip_gl_renderer = true; |
+ bool force_software_renderer = true; |
CreateAndSetRenderer( |
- output_surface_.get(), resource_provider_.get(), skip_gl_renderer); |
+ output_surface_.get(), resource_provider_.get(), force_software_renderer); |
EnforceZeroBudget(true); |
DCHECK(GetRendererCapabilities().using_map_image); |