diff options
author | hendrikw <hendrikw@chromium.org> | 2015-01-07 15:23:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-07 23:24:35 +0000 |
commit | b4e1d0be081c7a143cdad31e078411158a1491f9 (patch) | |
tree | 817f5a0f24a90e9810eb716a511c26c638fcc652 | |
parent | 43dc8fd3842f24de52afdc01cad25a500570caa5 (diff) | |
download | chromium_src-b4e1d0be081c7a143cdad31e078411158a1491f9.zip chromium_src-b4e1d0be081c7a143cdad31e078411158a1491f9.tar.gz chromium_src-b4e1d0be081c7a143cdad31e078411158a1491f9.tar.bz2 |
Revert of cc: Re-enable prepaint for GPU rasterization (patchset #1 id:1 of https://codereview.chromium.org/837533002/)
Reason for revert:
Better to leave this in, and now we know that this doesn't improve telemetry significantly
Original issue's description:
> cc: Re-enable prepaint for GPU rasterization
>
> The synchronous rasterization change for GPU rasterization tries
> to avoid prepainting, which may have caused longer frame times in
> some of the tests.
>
> We'll re-enable prepainting to see if this is the reason. This
> will probably be reverted.
>
> Committed: https://crrev.com/dee056c614737f8bf07686d38dfcc4d264c51813
> Cr-Commit-Position: refs/heads/master@{#309956}
TBR=vmpstr@chromium.org,vmiura@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/844503004
Cr-Commit-Position: refs/heads/master@{#310407}
-rw-r--r-- | cc/resources/tile_manager.cc | 20 | ||||
-rw-r--r-- | cc/resources/tile_manager.h | 3 |
2 files changed, 17 insertions, 6 deletions
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc index 4812df2..dff3a52 100644 --- a/cc/resources/tile_manager.cc +++ b/cc/resources/tile_manager.cc @@ -364,7 +364,7 @@ void TileManager::PrepareTiles( TileVector tiles_that_need_to_be_rasterized; AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized, - scheduled_raster_task_limit_); + scheduled_raster_task_limit_, false); // Schedule tile tasks. ScheduleTasks(tiles_that_need_to_be_rasterized); @@ -375,7 +375,7 @@ void TileManager::PrepareTiles( if (global_state_.hard_memory_limit_in_bytes == 0) { TileVector tiles_that_need_to_be_rasterized; AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized, - scheduled_raster_task_limit_); + scheduled_raster_task_limit_, false); DCHECK(tiles_that_need_to_be_rasterized.empty()); } @@ -407,7 +407,7 @@ void TileManager::SynchronouslyRasterizeTiles( TileVector tiles_that_need_to_be_rasterized; AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized, - std::numeric_limits<size_t>::max()); + std::numeric_limits<size_t>::max(), true); // We must reduce the amount of unused resources before calling // RunTasks to prevent usage from rising above limits. @@ -555,7 +555,8 @@ bool TileManager::TilePriorityViolatesMemoryPolicy( void TileManager::AssignGpuMemoryToTiles( TileVector* tiles_that_need_to_be_rasterized, - size_t scheduled_raster_task_limit) { + size_t scheduled_raster_task_limit, + bool required_for_draw_only) { TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles"); // Maintain the list of released resources that can potentially be re-used @@ -584,6 +585,15 @@ void TileManager::AssignGpuMemoryToTiles( while (!raster_priority_queue_.IsEmpty()) { Tile* tile = raster_priority_queue_.Top(); + + // TODO(vmpstr): Remove this when the iterator returns the correct tiles + // to draw for GPU rasterization. + if (required_for_draw_only) { + if (!tile->required_for_draw()) { + raster_priority_queue_.Pop(); + continue; + } + } TilePriority priority = tile->combined_priority(); if (TilePriorityViolatesMemoryPolicy(priority)) { @@ -941,7 +951,7 @@ void TileManager::CheckIfMoreTilesNeedToBePrepared() { // where top-priority tiles are initialized. TileVector tiles_that_need_to_be_rasterized; AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized, - scheduled_raster_task_limit_); + scheduled_raster_task_limit_, false); // |tiles_that_need_to_be_rasterized| will be empty when we reach a // steady memory state. Keep scheduling tasks until we reach this state. diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h index 8b84401..08f981e 100644 --- a/cc/resources/tile_manager.h +++ b/cc/resources/tile_manager.h @@ -196,7 +196,8 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient, const TileVector& tiles_that_need_to_be_rasterized); void AssignGpuMemoryToTiles(TileVector* tiles_that_need_to_be_rasterized, - size_t scheduled_raser_task_limit); + size_t scheduled_raser_task_limit, + bool required_for_draw_only); void SynchronouslyRasterizeTiles( const GlobalStateThatImpactsTilePriority& state); |