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

Unified Diff: cc/resources/tile_manager.cc

Issue 1051993002: cc: Remove tile sharing from tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 8 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
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 1e3c132ab646e4078f458dcc236dfe711f34723b..07094d6ebee9004ab2c8a3c5bb7c33908693ae95 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -443,7 +443,7 @@ TileManager::FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
break;
Tile* tile = eviction_priority_queue->Top();
- if (!other_priority.IsHigherPriorityThan(tile->combined_priority()))
+ if (!other_priority.IsHigherPriorityThan(tile->priority()))
break;
*usage -= MemoryUsage::FromTile(tile);
@@ -498,7 +498,7 @@ void TileManager::AssignGpuMemoryToTiles(
scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue;
for (; !raster_priority_queue->IsEmpty(); raster_priority_queue->Pop()) {
Tile* tile = raster_priority_queue->Top();
- TilePriority priority = tile->combined_priority();
+ TilePriority priority = tile->priority();
if (TilePriorityViolatesMemoryPolicy(priority)) {
TRACE_EVENT_INSTANT0(
@@ -690,9 +690,9 @@ scoped_refptr<RasterTask> TileManager::CreateRasterTask(Tile* tile) {
return make_scoped_refptr(new RasterTaskImpl(
const_resource, tile->raster_source(), tile->content_rect(),
- tile->contents_scale(), tile->combined_priority().resolution,
- tile->layer_id(), static_cast<const void*>(tile),
- tile->source_frame_number(), tile->use_picture_analysis(),
+ tile->contents_scale(), tile->priority().resolution, tile->layer_id(),
+ static_cast<const void*>(tile), tile->source_frame_number(),
+ tile->use_picture_analysis(),
base::Bind(&TileManager::OnRasterTaskCompleted, base::Unretained(this),
tile->id(), base::Passed(&resource)),
&decode_tasks));
@@ -761,7 +761,7 @@ void TileManager::UpdateTileDrawInfo(
}
scoped_refptr<Tile> TileManager::CreateTile(
- RasterSource* raster_source,
+ scoped_refptr<RasterSource>* raster_source,
const gfx::Size& desired_texture_size,
const gfx::Rect& content_rect,
float contents_scale,
@@ -797,6 +797,15 @@ bool TileManager::AreRequiredTilesReadyToDraw(
if (!raster_priority_queue->Top()->IsReadyToDraw())
return false;
}
+
+#if DCHECK_IS_ON()
+ scoped_ptr<RasterTilePriorityQueue> all_queue(
+ client_->BuildRasterQueue(global_state_.tree_priority, type));
+ for (; !all_queue->IsEmpty(); all_queue->Pop()) {
+ auto* tile = all_queue->Top();
+ DCHECK_IMPLIES(tile->required_for_activation(), tile->IsReadyToDraw());
+ }
+#endif
return true;
}
bool TileManager::IsReadyToActivate() const {

Powered by Google App Engine
This is Rietveld 408576698