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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/layer_tree_host_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 304b9fb742863d36b1929c4827d2e9ffc932d413..6b2b37f2c5f762e5c00250ceeb38c009536b6357 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -506,12 +506,9 @@ bool LayerTreeImpl::UpdateDrawProperties() {
}
{
- TRACE_EVENT2("cc",
- "LayerTreeImpl::UpdateTilePriorities",
- "IsActive",
- IsActiveTree(),
- "SourceFrameNumber",
- source_frame_number_);
+ TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateTilePriorities", "IsActive",
+ IsActiveTree(), "SourceFrameNumber",
+ source_frame_number_);
scoped_ptr<OcclusionTracker<LayerImpl>> occlusion_tracker;
if (settings().use_occlusion_for_tile_prioritization) {
occlusion_tracker.reset(new OcclusionTracker<LayerImpl>(
@@ -528,6 +525,7 @@ bool LayerTreeImpl::UpdateDrawProperties() {
// draw properties) and not because any ordering is required.
typedef LayerIterator<LayerImpl> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_);
+ size_t layers_updated_count = 0;
for (LayerIteratorType it =
LayerIteratorType::Begin(&render_surface_layer_list_);
it != end;
@@ -544,6 +542,7 @@ bool LayerTreeImpl::UpdateDrawProperties() {
if (it.represents_itself()) {
layer->UpdateTiles(occlusion_in_content_space,
resourceless_software_draw);
+ ++layers_updated_count;
}
if (!it.represents_contributing_render_surface()) {
@@ -555,15 +554,20 @@ bool LayerTreeImpl::UpdateDrawProperties() {
if (layer->mask_layer()) {
layer->mask_layer()->UpdateTiles(occlusion_in_content_space,
resourceless_software_draw);
+ ++layers_updated_count;
}
if (layer->replica_layer() && layer->replica_layer()->mask_layer()) {
layer->replica_layer()->mask_layer()->UpdateTiles(
occlusion_in_content_space, resourceless_software_draw);
+ ++layers_updated_count;
}
if (occlusion_tracker)
occlusion_tracker->LeaveLayer(it);
}
+
+ TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities",
+ "layers_updated_count", layers_updated_count);
}
DCHECK(!needs_update_draw_properties_) <<
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698