Chromium Code Reviews| Index: cc/tile_manager.cc |
| diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc |
| index 2a426d35608af31d4ae3e9fcd7ff1bd4c3740e20..d1f4f1956431a542817b96c738ae10028eb64ec3 100644 |
| --- a/cc/tile_manager.cc |
| +++ b/cc/tile_manager.cc |
| @@ -657,6 +657,7 @@ void TileManager::DispatchOneRasterTask(scoped_refptr<Tile> tile) { |
| resource_id), |
| tile->content_rect_, |
| tile->contents_scale(), |
| + use_cheapness_estimator_, |
| tile->picture_pile(), |
| &rendering_stats_); |
| TileManager::OnRasterTaskCompleted(tile, resource.Pass(), |
| @@ -670,7 +671,8 @@ void TileManager::DispatchOneRasterTask(scoped_refptr<Tile> tile) { |
| resource_pool_->resource_provider()->mapPixelBuffer( |
| resource_id), |
| tile->content_rect_, |
| - tile->contents_scale()), |
| + tile->contents_scale(), |
| + use_cheapness_estimator_), |
| base::Bind(&TileManager::OnRasterTaskCompletedByWorker, |
| base::Unretained(this), |
| tile, |
| @@ -776,6 +778,7 @@ void TileManager::DidTileBinChange(Tile* tile, |
| void TileManager::RunRasterTask(uint8* buffer, |
| const gfx::Rect& rect, |
| float contents_scale, |
| + bool use_cheapness_estimator, |
| PicturePileImpl* picture_pile, |
| RenderingStats* stats) { |
| TRACE_EVENT0("cc", "TileManager::RunRasterTask"); |
| @@ -802,10 +805,43 @@ void TileManager::RunRasterTask(uint8* buffer, |
| duration.InMilliseconds(), |
| 0, 10, 10 |
| ); |
| + |
| + if (use_cheapness_estimator) |
| + RecordCheapnessPredictorCorrectness( |
| + picture_pile->IsCheapInRect (rect, contents_scale), |
|
nduca
2013/02/05 00:22:26
might pull out the calculation into local vars so
|
| + duration.InMillisecondsF() <= 1.0f |
| + ); |
| } |
| } |
| // static |
| +void TileManager::RecordCheapnessPredictorCorrectness( |
|
nduca
2013/02/05 00:22:26
RecordCheapnessPredictorResults?
|
| + bool is_predicted_cheap, |
| + bool is_actually_cheap) { |
| + |
| + if (is_predicted_cheap) |
| + UMA_HISTOGRAM_BOOLEAN( |
|
nduca
2013/02/05 00:22:26
i think these two should actually e
if (is_predic
|
| + "Renderer4.CheapPredictorIsCheapAccuracy", |
| + is_actually_cheap |
| + ); |
| + else |
| + UMA_HISTOGRAM_BOOLEAN( |
| + "Renderer4.CheapPredictorIsNotCheapAccuracy", |
| + !is_actually_cheap |
| + ); |
| + |
|
nduca
2013/02/05 00:22:26
are histograms the right thing to track here? The
|
| + bool is_correct_estimate = false; |
| + if ((is_predicted_cheap && is_actually_cheap) || |
|
nduca
2013/02/05 00:22:26
isn't this just
is_predicted_cheap == is_actuall
|
| + (!is_predicted_cheap && !is_actually_cheap)) |
| + is_correct_estimate = true; |
| + |
| + UMA_HISTOGRAM_BOOLEAN( |
| + "Renderer4.CheapPredictorOverallAccuracy", |
|
nduca
2013/02/05 00:22:26
same comment about histograms being the right tool
|
| + is_correct_estimate |
| + ); |
| +} |
| + |
| +// static |
| void TileManager::RunImageDecodeTask(skia::LazyPixelRef* pixel_ref, |
| RenderingStats* stats) { |
| TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask"); |