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

Unified Diff: cc/tile_manager.cc

Issue 12209022: cc: add rasterize time to continuous painting graph data in impl-side-painting (Closed) Base URL: http://git.chromium.org/chromium/src.git@raster
Patch Set: Save paint and rasterize time in per frame struct Created 7 years, 10 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/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
index 16d82d46a8a885052d1549bf4749c73e9d1e50f9..04e7be403a13016081dad6883f861d308a9ad605 100644
--- a/cc/tile_manager.cc
+++ b/cc/tile_manager.cc
@@ -696,6 +696,9 @@ void TileManager::DispatchOneRasterTask(scoped_refptr<Tile> tile) {
scoped_ptr<ResourcePool::Resource> resource = PrepareTileForRaster(tile);
ResourceProvider::ResourceId resource_id = resource->id();
+ bool is_pending_now_bin =
+ tile->managed_state().tree_bin[PENDING_TREE] == NOW_BIN;
+
raster_worker_pool_->PostRasterTaskAndReply(
tile->picture_pile(),
base::Bind(&TileManager::PerformRaster,
@@ -703,7 +706,8 @@ void TileManager::DispatchOneRasterTask(scoped_refptr<Tile> tile) {
resource_id),
tile->content_rect_,
tile->contents_scale(),
- use_cheapness_estimator_),
+ use_cheapness_estimator_,
+ is_pending_now_bin),
base::Bind(&TileManager::OnRasterTaskCompleted,
base::Unretained(this),
tile,
@@ -715,11 +719,15 @@ void TileManager::PerformOneRaster(Tile* tile) {
scoped_ptr<ResourcePool::Resource> resource = PrepareTileForRaster(tile);
ResourceProvider::ResourceId resource_id = resource->id();
+ bool is_pending_now_bin =
+ tile->managed_state().tree_bin[PENDING_TREE] == NOW_BIN;
+
PerformRaster(resource_pool_->resource_provider()->mapPixelBuffer(
resource_id),
tile->content_rect_,
tile->contents_scale(),
use_cheapness_estimator_,
+ is_pending_now_bin,
tile->picture_pile(),
&rendering_stats_);
@@ -825,6 +833,7 @@ void TileManager::PerformRaster(uint8* buffer,
const gfx::Rect& rect,
float contents_scale,
bool use_cheapness_estimator,
+ bool is_pending_now_bin,
PicturePileImpl* picture_pile,
RenderingStats* stats) {
TRACE_EVENT0("cc", "TileManager::PerformRaster");
@@ -861,6 +870,9 @@ void TileManager::PerformRaster(uint8* buffer,
bool is_actually_cheap = duration.InMillisecondsF() <= 1.0f;
RecordCheapnessPredictorResults(is_predicted_cheap, is_actually_cheap);
}
+
+ if (is_pending_now_bin)
+ stats->totalRasterizeTimeForNowBinsOnPendingTree += duration;
}
}
« cc/paint_time_counter.cc ('K') | « cc/tile_manager.h ('k') | cc/worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698