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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 266353003: aw: Ubercomp mega patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « cc/trees/blocking_task_runner.cc ('k') | cc/trees/proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « cc/trees/blocking_task_runner.cc ('k') | cc/trees/proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698