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

Unified Diff: cc/tiles/tile_manager.cc

Issue 2654643004: cc: Fix missing ready to activate/draw callbacks. (Closed)
Patch Set: Created 3 years, 11 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/tiles/tile_manager.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index e9a84a765293fe5619cd9e1fe77221a87ecb6ed1..4a13c410ea5daf1cc5daccd0386892e612a13036 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -1209,30 +1209,28 @@ void TileManager::CheckIfMoreTilesNeedToBePrepared() {
// even when OOM. Note that we can't reuse the queue we used for
// AssignGpuMemoryToTiles, since the AssignGpuMemoryToTiles call could have
// evicted some tiles that would not be picked up by the old raster queue.
- bool need_to_signal_activate = MarkTilesOutOfMemory(client_->BuildRasterQueue(
+ MarkTilesOutOfMemory(client_->BuildRasterQueue(
global_state_.tree_priority,
RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION));
- bool need_to_signal_draw = MarkTilesOutOfMemory(client_->BuildRasterQueue(
+ MarkTilesOutOfMemory(client_->BuildRasterQueue(
global_state_.tree_priority,
RasterTilePriorityQueue::Type::REQUIRED_FOR_DRAW));
// TODO(vmpstr): Temporary check to debug crbug.com/642927.
CHECK(tile_task_manager_);
+
DCHECK(IsReadyToActivate());
DCHECK(IsReadyToDraw());
- signals_.ready_to_activate = need_to_signal_activate;
- signals_.ready_to_draw = need_to_signal_draw;
+ signals_.ready_to_activate = true;
+ signals_.ready_to_draw = true;
// TODO(ericrk): Investigate why we need to schedule this (not just call it
// inline). http://crbug.com/498439
signals_check_notifier_.Schedule();
}
-bool TileManager::MarkTilesOutOfMemory(
+void TileManager::MarkTilesOutOfMemory(
std::unique_ptr<RasterTilePriorityQueue> queue) const {
// Mark required tiles as OOM so that we can activate/draw without them.
- if (queue->IsEmpty())
- return false;
-
for (; !queue->IsEmpty(); queue->Pop()) {
Tile* tile = queue->Top().tile();
if (tile->draw_info().IsReadyToDraw())
@@ -1240,7 +1238,6 @@ bool TileManager::MarkTilesOutOfMemory(
tile->draw_info().set_oom();
client_->NotifyTileStateChanged(tile);
}
- return true;
}
ResourceFormat TileManager::DetermineResourceFormat(const Tile* tile) const {
« no previous file with comments | « cc/tiles/tile_manager.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698