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

Unified Diff: cc/resources/tile_manager.cc

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/resources/tile.cc ('k') | cc/resources/tile_manager_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 7ea86f00c442ab1c0a4909a2197fffbcca6b1efe..71f2e83017547d2aa9131b37c619bf8bee749041 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -366,15 +366,16 @@ void TileManager::PrepareTiles(
scoped_ptr<RasterTilePriorityQueue> raster_priority_queue(
client_->BuildRasterQueue(global_state_.tree_priority,
RasterTilePriorityQueue::Type::ALL));
- // Inform the client that will likely require a draw if the top tile is
- // required for draw.
- client_->SetIsLikelyToRequireADraw(
- !raster_priority_queue->IsEmpty() &&
- raster_priority_queue->Top()->required_for_draw());
AssignGpuMemoryToTiles(raster_priority_queue.get(),
scheduled_raster_task_limit_,
&tiles_that_need_to_be_rasterized);
+ // Inform the client that will likely require a draw if the highest priority
+ // tile that will be rasterized is required for draw.
+ client_->SetIsLikelyToRequireADraw(
+ !tiles_that_need_to_be_rasterized.empty() &&
+ (*tiles_that_need_to_be_rasterized.begin())->required_for_draw());
+
// Schedule tile tasks.
ScheduleTasks(tiles_that_need_to_be_rasterized);
« no previous file with comments | « cc/resources/tile.cc ('k') | cc/resources/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698