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

Unified Diff: cc/tile_manager.cc

Issue 12192025: Add cheapness predictor success histogram (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « cc/tile_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
index 2a426d35608af31d4ae3e9fcd7ff1bd4c3740e20..fa54ebdfcd963de1d8bc3cc96e92fa4119a92acf 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,6 +805,21 @@ void TileManager::RunRasterTask(uint8* buffer,
duration.InMilliseconds(),
0, 10, 10
);
+
+ if (use_cheapness_estimator) {
+ bool is_cheap = picture_pile->IsCheapInRect (rect, contents_scale);
+ bool is_correct_estimate = false;
+
+ // Cheap means less than 1ms
+ if ((is_cheap && duration.InMillisecondsF() <= 1.0f) ||
+ (!is_cheap && duration.InMillisecondsF() > 1.0f))
+ is_correct_estimate = true;
+
+ UMA_HISTOGRAM_BOOLEAN(
+ "Renderer4.CheapnessPredictorAccuracy",
+ is_correct_estimate
+ );
+ }
}
}
« no previous file with comments | « cc/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698