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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 633773004: cc: Pass Occlusion instead of OcclusionTracker to LayerImpls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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/layers/picture_layer_impl.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index c1809d8fbe02d07c476a2d3996b83211f34a9e27..495003c74b4b170cd8f7916b4aae799c133dafe0 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -1377,7 +1377,6 @@ TEST_F(PictureLayerImplTest, ClampSingleTileToToMaxTileSize) {
}
TEST_F(PictureLayerImplTest, DisallowTileDrawQuads) {
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
gfx::Size tile_size(400, 400);
@@ -1399,7 +1398,7 @@ TEST_F(PictureLayerImplTest, DisallowTileDrawQuads) {
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_RESOURCELESS_SOFTWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
ASSERT_EQ(1U, render_pass->quad_list.size());
@@ -1580,11 +1579,10 @@ TEST_F(PictureLayerImplTest, TileOutsideOfViewportForTilePriorityNotRequired) {
host_impl_.active_tree()->UpdateDrawProperties();
active_layer_->draw_properties().visible_content_rect = visible_content_rect;
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_SOFTWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
// All tiles in activation rect is ready to draw.
@@ -1615,11 +1613,10 @@ TEST_F(PictureLayerImplTest, HighResTileIsComplete) {
active_layer_->tilings()->tiling_at(0)->AllTilesForTesting();
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(tiles);
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_SOFTWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
// All high res tiles drew, nothing was incomplete.
@@ -1657,11 +1654,10 @@ TEST_F(PictureLayerImplTest, LowResTileIsIncomplete) {
active_layer_->tilings()->tiling_at(1)->AllTilesForTesting();
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(low_tiles);
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_SOFTWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
// The missing high res tile was replaced by a low res tile.
@@ -1719,11 +1715,10 @@ TEST_F(PictureLayerImplTest,
active_layer_->HighResTiling()->AllTilesForTesting();
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(high_tiles);
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_SOFTWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
// All high res tiles drew, and the one ideal res tile drew.
@@ -3468,7 +3463,6 @@ TEST_F(NoLowResPictureLayerImplTest, ReleaseResources) {
}
TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) {
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
gfx::Size tile_size(400, 400);
@@ -3494,7 +3488,7 @@ TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) {
SK_MScalar1 / max_contents_scale);
AppendQuadsData data;
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
// SharedQuadState should have be of size 1, as we are doing AppenQuad once.
EXPECT_EQ(1u, render_pass->shared_quad_state_list.size());
@@ -3603,11 +3597,10 @@ TEST_F(PictureLayerImplTestWithDelegatingRenderer,
host_impl_.SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES);
host_impl_.ManageTiles();
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_HARDWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
// Even when OOM, quads should be produced, and should be different material
@@ -4314,11 +4307,10 @@ void PictureLayerImplTest::TestQuadsForSolidColor(bool test_for_solid) {
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(tiles);
}
- MockOcclusionTracker<LayerImpl> occlusion_tracker;
scoped_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
active_layer_->WillDraw(DRAW_MODE_SOFTWARE, NULL);
- active_layer_->AppendQuads(render_pass.get(), occlusion_tracker, &data);
+ active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data);
active_layer_->DidDraw(NULL);
DrawQuad::Material expected = test_for_solid
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698