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

Unified Diff: cc/tiles/tile_manager.cc

Issue 2636323002: 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 047b0e63f9b2673aa20f80606a09c1b45ad51179..112765b011ea44aa30d20bcfe17d8a23f61d037e 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -1229,28 +1229,26 @@ 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 notifier is already scheduled above in the same function.
- 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;
}
-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())
@@ -1258,7 +1256,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