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

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: Removed cl 12194015 change from diff 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
« cc/tile_manager.h ('K') | « 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..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");
« cc/tile_manager.h ('K') | « cc/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698