Index: cc/tile_manager.cc |
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc |
index aa6701271058e691fd036c121234eaecb4fe6bc6..2115792130ed8a9d26ac9019934a53622013666b 100644 |
--- a/cc/tile_manager.cc |
+++ b/cc/tile_manager.cc |
@@ -225,7 +225,9 @@ void TileManager::ManageTiles() { |
DispatchMoreTasks(); |
} |
-void TileManager::CheckForCompletedSetPixels() { |
+bool TileManager::CheckForCompletedSetPixels() { |
+ bool visible_highres_tile_was_completed = false; |
+ |
while (!tiles_with_pending_set_pixels_.empty()) { |
Tile* tile = tiles_with_pending_set_pixels_.front(); |
DCHECK(tile->managed_state().resource); |
@@ -236,6 +238,10 @@ void TileManager::CheckForCompletedSetPixels() { |
break; |
} |
+ if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0 && |
+ tile->priority(ACTIVE_TREE).resolution == HIGH_RESOLUTION) |
+ visible_highres_tile_was_completed = true; |
nduca
2013/01/12 09:14:02
why not just trigger a setNeedsRedraw here? In thi
brianderson
2013/01/12 18:48:06
I did it this way for two reasons:
1) After the d
nduca
2013/01/12 22:04:40
But look at this function. At this specific line,
brianderson
2013/01/14 18:51:12
The problem is that there can be a missmatch betwe
|
+ |
// It's now safe to release the pixel buffer. |
resource_pool_->resource_provider()->releasePixelBuffer( |
tile->managed_state().resource->id()); |
@@ -243,6 +249,8 @@ void TileManager::CheckForCompletedSetPixels() { |
DidFinishTileInitialization(tile); |
tiles_with_pending_set_pixels_.pop(); |
} |
+ |
+ return visible_highres_tile_was_completed; |
} |
void TileManager::GetRenderingStats(RenderingStats* stats) { |