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

Unified Diff: cc/resources/tile.cc

Issue 793573006: Refactoring for merging ManagedTileState into Tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a nit Created 6 years 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.h ('k') | cc/resources/tile_draw_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile.cc
diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc
index 4cbc7586ec2e84b5f7df89d315a8a6fa6ec6b33e..63146dec6fdd63cec156646e5ad453568208af7a 100644
--- a/cc/resources/tile.cc
+++ b/cc/resources/tile.cc
@@ -37,7 +37,8 @@ Tile::Tile(TileManager* tile_manager,
tiling_j_index_(-1),
required_for_activation_(false),
required_for_draw_(false),
- id_(s_next_id_++) {
+ id_(s_next_id_++),
+ scheduled_priority_(0) {
set_raster_source(raster_source);
for (int i = 0; i < NUM_TREES; i++)
is_occluded_[i] = false;
@@ -69,23 +70,26 @@ void Tile::AsValueInto(base::debug::TracedValue* res) const {
priority_[PENDING_TREE].AsValueInto(res);
res->EndDictionary();
- res->BeginDictionary("managed_state");
- managed_state_.AsValueInto(res);
+ res->BeginDictionary("draw_info");
+ draw_info_.AsValueInto(res);
res->EndDictionary();
+ res->SetBoolean("has_resource", HasResource());
+ res->SetBoolean("is_using_gpu_memory", HasResource() || HasRasterTask());
+ res->SetString("resolution",
+ TileResolutionToString(combined_priority().resolution));
+
+ res->SetInteger("scheduled_priority", scheduled_priority_);
+
res->SetBoolean("use_picture_analysis", use_picture_analysis());
res->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes());
}
size_t Tile::GPUMemoryUsageInBytes() const {
- if (managed_state_.draw_info.resource_)
- return managed_state_.draw_info.resource_->bytes();
+ if (draw_info_.resource_)
+ return draw_info_.resource_->bytes();
return 0;
}
-bool Tile::HasRasterTask() const {
- return !!managed_state_.raster_task.get();
-}
-
} // namespace cc
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_draw_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698