diff options
author | ajuma <ajuma@chromium.org> | 2015-11-30 13:55:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-30 21:56:31 +0000 |
commit | dcf8361b6c9cd94309f1a927187db5e8aa66849f (patch) | |
tree | 968304016d0779f98add74a96c33e4b3b935ea0f /cc | |
parent | 9073135c8d9ede9b1b0ba230fcfaddad3ee736b0 (diff) | |
download | chromium_src-dcf8361b6c9cd94309f1a927187db5e8aa66849f.zip chromium_src-dcf8361b6c9cd94309f1a927187db5e8aa66849f.tar.gz chromium_src-dcf8361b6c9cd94309f1a927187db5e8aa66849f.tar.bz2 |
cc: Build property trees for layer trees constructed in perf tests
Perf tests that directly construct LayerTreeImpls need to also build
property trees for these layer trees.
This fixes 11 cc_perftests that otherwise crash when property trees
are enabled.
BUG=563526
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1487803002
Cr-Commit-Position: refs/heads/master@{#362230}
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layers/picture_layer_impl_perftest.cc | 1 | ||||
-rw-r--r-- | cc/tiles/tile_manager_perftest.cc | 4 | ||||
-rw-r--r-- | cc/trees/occlusion_tracker_perftest.cc | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc index 9820c21..6521e1c 100644 --- a/cc/layers/picture_layer_impl_perftest.cc +++ b/cc/layers/picture_layer_impl_perftest.cc @@ -68,6 +68,7 @@ class PictureLayerImplPerfTest : public testing::Test { pending_layer->SetDrawsContent(true); pending_layer->SetHasRenderSurface(true); pending_tree->SetRootLayer(std::move(pending_layer)); + pending_tree->BuildPropertyTreesForTesting(); pending_layer_ = static_cast<FakePictureLayerImpl*>( host_impl_.pending_tree()->LayerById(7)); diff --git a/cc/tiles/tile_manager_perftest.cc b/cc/tiles/tile_manager_perftest.cc index 9bc3c18..81213d4 100644 --- a/cc/tiles/tile_manager_perftest.cc +++ b/cc/tiles/tile_manager_perftest.cc @@ -173,6 +173,7 @@ class TileManagerPerfTest : public testing::Test { pending_layer->SetDrawsContent(true); pending_layer->SetHasRenderSurface(true); pending_tree->SetRootLayer(std::move(pending_layer)); + pending_tree->BuildPropertyTreesForTesting(); pending_root_layer_ = static_cast<FakePictureLayerImpl*>( host_impl_.pending_tree()->LayerById(id_)); @@ -364,6 +365,9 @@ class TileManagerPerfTest : public testing::Test { ++next_id; } + // Property trees need to be rebuilt because layers were added above. + host_impl_.pending_tree()->property_trees()->needs_rebuild = true; + host_impl_.pending_tree()->BuildPropertyTreesForTesting(); bool update_lcd_text = false; host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); for (FakePictureLayerImpl* layer : layers) diff --git a/cc/trees/occlusion_tracker_perftest.cc b/cc/trees/occlusion_tracker_perftest.cc index b7ecf3b..0df01e1 100644 --- a/cc/trees/occlusion_tracker_perftest.cc +++ b/cc/trees/occlusion_tracker_perftest.cc @@ -91,6 +91,7 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_FullyOccluded) { opaque_layer->SetDrawsContent(true); opaque_layer->SetBounds(viewport_rect.size()); active_tree()->root_layer()->AddChild(std::move(opaque_layer)); + active_tree()->BuildPropertyTreesForTesting(); bool update_lcd_text = false; active_tree()->UpdateDrawProperties(update_lcd_text); @@ -162,6 +163,7 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_10OpaqueLayers) { active_tree()->root_layer()->AddChild(std::move(opaque_layer)); } + active_tree()->BuildPropertyTreesForTesting(); bool update_lcd_text = false; active_tree()->UpdateDrawProperties(update_lcd_text); const LayerImplList& rsll = active_tree()->RenderSurfaceLayerList(); |