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

Unified Diff: cc/tile_manager.cc

Issue 12220115: [cc] Dont throw away tiles that stop moving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
index 16d82d46a8a885052d1549bf4749c73e9d1e50f9..7a77a62c301b4c29b3e7c7da2dfd9a95908a5025 100644
--- a/cc/tile_manager.cc
+++ b/cc/tile_manager.cc
@@ -49,9 +49,6 @@ inline TileManagerBin BinFromTilePriority(const TilePriority& prio) {
TilePriority::kMaxDistanceInContentSpace)
return NEVER_BIN;
- if (prio.time_to_visible_in_seconds == std::numeric_limits<float>::max())
- return NEVER_BIN;
-
if (prio.time_to_visible_in_seconds == 0 ||
prio.distance_to_visible_in_pixels < backfling_guard_distance_pixels)
return NOW_BIN;
@@ -517,8 +514,16 @@ void TileManager::AssignGpuMemoryToTiles() {
}
bytes_left -= tile_bytes;
managed_tile_state.can_use_gpu_memory = true;
- if (!managed_tile_state.resource &&
- !managed_tile_state.resource_is_being_initialized) {
+ if (managed_tile_state.resource ||
ccameron 2013/02/12 05:05:36 Remove this part of the diff.
+ managed_tile_state.resource_is_being_initialized)
+ continue;
+
+ // Only rasterize NOW, and SOON tiles. EVENTUALLY-binned tiles are kept
+ // around if we had their texture, but a never pro-actively painted.
+ bool is_in_eventually_bins =
+ managed_tile_state.bin[HIGH_PRIORITY_BIN] == EVENTUALLY_BIN &&
+ managed_tile_state.bin[LOW_PRIORITY_BIN] == EVENTUALLY_BIN;
+ if (!is_in_eventually_bins) {
tiles_that_need_to_be_rasterized_.push_back(tile);
DidTileRasterStateChange(tile, WAITING_FOR_RASTER_STATE);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698