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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1939963002: cc: Move prepaint region calculations to the tiling set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/layers/picture_layer_impl.cc ('k') | cc/proto/layer_tree_settings.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 EXPECT_TRUE(active_tiling->TileAt(1, 0)); 2270 EXPECT_TRUE(active_tiling->TileAt(1, 0));
2271 EXPECT_TRUE(active_tiling->TileAt(0, 1)); 2271 EXPECT_TRUE(active_tiling->TileAt(0, 1));
2272 EXPECT_FALSE(pending_tiling->TileAt(0, 0)); 2272 EXPECT_FALSE(pending_tiling->TileAt(0, 0));
2273 EXPECT_FALSE(pending_tiling->TileAt(1, 0)); 2273 EXPECT_FALSE(pending_tiling->TileAt(1, 0));
2274 EXPECT_FALSE(pending_tiling->TileAt(0, 1)); 2274 EXPECT_FALSE(pending_tiling->TileAt(0, 1));
2275 EXPECT_NE(active_tiling->TileAt(1, 1), pending_tiling->TileAt(1, 1)); 2275 EXPECT_NE(active_tiling->TileAt(1, 1), pending_tiling->TileAt(1, 1));
2276 EXPECT_TRUE(active_tiling->TileAt(1, 1)); 2276 EXPECT_TRUE(active_tiling->TileAt(1, 1));
2277 EXPECT_TRUE(pending_tiling->TileAt(1, 1)); 2277 EXPECT_TRUE(pending_tiling->TileAt(1, 1));
2278 2278
2279 // Drop the tiles on the active tree and recreate them. 2279 // Drop the tiles on the active tree and recreate them.
2280 active_tiling->ComputeTilePriorityRects(gfx::Rect(), 1.f, 1.0, Occlusion()); 2280 active_layer_->tilings()->UpdateTilePriorities(gfx::Rect(), 1.f, 1.0,
2281 Occlusion(), true);
2281 EXPECT_TRUE(active_tiling->AllTilesForTesting().empty()); 2282 EXPECT_TRUE(active_tiling->AllTilesForTesting().empty());
2282 active_tiling->CreateAllTilesForTesting(); 2283 active_tiling->CreateAllTilesForTesting();
2283 2284
2284 // Tile 0,0 not exist on pending, but tile 1,1 should. 2285 // Tile 0,0 not exist on pending, but tile 1,1 should.
2285 EXPECT_TRUE(active_tiling->TileAt(0, 0)); 2286 EXPECT_TRUE(active_tiling->TileAt(0, 0));
2286 EXPECT_TRUE(active_tiling->TileAt(1, 0)); 2287 EXPECT_TRUE(active_tiling->TileAt(1, 0));
2287 EXPECT_TRUE(active_tiling->TileAt(0, 1)); 2288 EXPECT_TRUE(active_tiling->TileAt(0, 1));
2288 EXPECT_FALSE(pending_tiling->TileAt(0, 0)); 2289 EXPECT_FALSE(pending_tiling->TileAt(0, 0));
2289 EXPECT_FALSE(pending_tiling->TileAt(1, 0)); 2290 EXPECT_FALSE(pending_tiling->TileAt(1, 0));
2290 EXPECT_FALSE(pending_tiling->TileAt(0, 1)); 2291 EXPECT_FALSE(pending_tiling->TileAt(0, 1));
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after
4890 // New low res tiling. 4891 // New low res tiling.
4891 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 4892 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
4892 4893
4893 // This tiling will be high res now, it won't contain low res content since it 4894 // This tiling will be high res now, it won't contain low res content since it
4894 // was all destroyed. 4895 // was all destroyed.
4895 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 4896 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
4896 } 4897 }
4897 4898
4898 } // namespace 4899 } // namespace
4899 } // namespace cc 4900 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/proto/layer_tree_settings.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698