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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add early-out and unit test Created 7 years, 8 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: 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 b81c19b29cfead16ecb7eb06289b5d183138686a..f8230e79175d46bfa92ffaab7b8143c01889e6dd 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -233,7 +233,7 @@ void LayerTreeHostImpl::CommitComplete() {
// more lazily when needed prior to drawing.
if (settings_.impl_side_painting) {
pending_tree_->set_needs_update_draw_properties();
- pending_tree_->UpdateDrawProperties(LayerTreeImpl::UPDATE_PENDING_TREE);
+ pending_tree_->UpdateDrawProperties();
} else {
active_tree_->set_needs_update_draw_properties();
}
@@ -879,8 +879,7 @@ bool LayerTreeHostImpl::PrepareToDraw(FrameData* frame,
gfx::Rect device_viewport_damage_rect) {
TRACE_EVENT0("cc", "LayerTreeHostImpl::PrepareToDraw");
- active_tree_->UpdateDrawProperties(
- LayerTreeImpl::UPDATE_ACTIVE_TREE_FOR_DRAW);
+ active_tree_->UpdateDrawProperties();
frame->render_surface_layer_list = &active_tree_->RenderSurfaceLayerList();
frame->render_passes.clear();
@@ -1270,7 +1269,7 @@ bool LayerTreeHostImpl::ActivatePendingTreeIfNeeded() {
CHECK(tile_manager_);
- pending_tree_->UpdateDrawProperties(LayerTreeImpl::UPDATE_PENDING_TREE);
+ pending_tree_->UpdateDrawProperties();
TRACE_EVENT_ASYNC_STEP1("cc",
"PendingTree", pending_tree_.get(), "activate",
@@ -1465,7 +1464,7 @@ void LayerTreeHostImpl::DidChangeTopControlsPosition() {
}
bool LayerTreeHostImpl::EnsureRenderSurfaceLayerList() {
- active_tree_->UpdateDrawProperties(LayerTreeImpl::UPDATE_ACTIVE_TREE);
+ active_tree_->UpdateDrawProperties();
return !active_tree_->RenderSurfaceLayerList().empty();
}

Powered by Google App Engine
This is Rietveld 408576698