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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2034583002: Initialize the Display's renderer when the Display is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@displaytest
Patch Set: displayinit: . Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/test/pixel_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 if (recycle_tree_) 2105 if (recycle_tree_)
2106 recycle_tree_->RecreateResources(); 2106 recycle_tree_->RecreateResources();
2107 } 2107 }
2108 2108
2109 void LayerTreeHostImpl::CreateAndSetRenderer() { 2109 void LayerTreeHostImpl::CreateAndSetRenderer() {
2110 DCHECK(!renderer_); 2110 DCHECK(!renderer_);
2111 DCHECK(output_surface_); 2111 DCHECK(output_surface_);
2112 DCHECK(resource_provider_); 2112 DCHECK(resource_provider_);
2113 2113
2114 DCHECK(output_surface_->capabilities().delegated_rendering); 2114 DCHECK(output_surface_->capabilities().delegated_rendering);
2115 renderer_ = 2115 renderer_ = base::MakeUnique<DelegatingRenderer>(
2116 DelegatingRenderer::Create(this, &settings_.renderer_settings, 2116 this, &settings_.renderer_settings, output_surface_,
2117 output_surface_, resource_provider_.get()); 2117 resource_provider_.get());
2118 renderer_->SetVisible(visible_); 2118 renderer_->SetVisible(visible_);
2119 SetFullRootLayerDamage(); 2119 SetFullRootLayerDamage();
2120 2120
2121 // See note in LayerTreeImpl::UpdateDrawProperties. Renderer needs to be 2121 // See note in LayerTreeImpl::UpdateDrawProperties. Renderer needs to be
2122 // initialized to get max texture size. Also, after releasing resources, 2122 // initialized to get max texture size. Also, after releasing resources,
2123 // trees need another update to generate new ones. 2123 // trees need another update to generate new ones.
2124 active_tree_->set_needs_update_draw_properties(); 2124 active_tree_->set_needs_update_draw_properties();
2125 if (pending_tree_) 2125 if (pending_tree_)
2126 pending_tree_->set_needs_update_draw_properties(); 2126 pending_tree_->set_needs_update_draw_properties();
2127 client_->UpdateRendererCapabilitiesOnImplThread(); 2127 client_->UpdateRendererCapabilitiesOnImplThread();
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after
4023 return task_runner_provider_->HasImplThread(); 4023 return task_runner_provider_->HasImplThread();
4024 } 4024 }
4025 4025
4026 bool LayerTreeHostImpl::CommitToActiveTree() const { 4026 bool LayerTreeHostImpl::CommitToActiveTree() const {
4027 // In single threaded mode we skip the pending tree and commit directly to the 4027 // In single threaded mode we skip the pending tree and commit directly to the
4028 // active tree. 4028 // active tree.
4029 return !task_runner_provider_->HasImplThread(); 4029 return !task_runner_provider_->HasImplThread();
4030 } 4030 }
4031 4031
4032 } // namespace cc 4032 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698