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

Unified Diff: cc/layers/tiled_layer.cc

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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/layers/tiled_layer.cc
diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc
index 940f948d1e62bbd4cfbb2660f70ab0e6dd228fa4..14bd5d64ea4d27173233c2b8a6264f7afe1d7486 100644
--- a/cc/layers/tiled_layer.cc
+++ b/cc/layers/tiled_layer.cc
@@ -314,7 +314,6 @@ bool TiledLayer::UpdateTiles(int left,
int bottom,
ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion,
- RenderingStats* stats,
bool* did_paint) {
*did_paint = false;
CreateUpdaterIfNeeded();
@@ -336,7 +335,7 @@ bool TiledLayer::UpdateTiles(int left,
*did_paint = true;
UpdateTileTextures(
- paint_rect, left, top, right, bottom, queue, occlusion, stats);
+ paint_rect, left, top, right, bottom, queue, occlusion);
return true;
}
@@ -462,8 +461,7 @@ void TiledLayer::UpdateTileTextures(gfx::Rect paint_rect,
int right,
int bottom,
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
// The update_rect should be in layer space. So we have to convert the
// paint_rect from content space to layer space.
float width_scale =
@@ -483,8 +481,7 @@ void TiledLayer::UpdateTileTextures(gfx::Rect paint_rect,
tiler_->tile_size(),
1.f / width_scale,
1.f / height_scale,
- &painted_opaque_rect,
- stats);
+ &painted_opaque_rect);
for (int j = top; j <= bottom; ++j) {
for (int i = left; i <= right; ++i) {
@@ -549,7 +546,7 @@ void TiledLayer::UpdateTileTextures(gfx::Rect paint_rect,
CHECK_LE(paint_offset.y() + source_rect.height(), paint_rect.height());
tile->updater_resource()->Update(
- queue, source_rect, dest_offset, tile->partial_update, stats);
+ queue, source_rect, dest_offset, tile->partial_update);
if (occlusion) {
occlusion->overdraw_metrics()->
DidUpload(gfx::Transform(), source_rect, tile->opaque_rect());
@@ -717,14 +714,13 @@ void TiledLayer::UpdateScrollPrediction() {
}
void TiledLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
DCHECK(!skips_draw_ && !failed_update_); // Did ResetUpdateState get skipped?
{
base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_,
true);
- ContentsScalingLayer::Update(queue, occlusion, stats);
+ ContentsScalingLayer::Update(queue, occlusion);
UpdateBounds();
}
@@ -743,7 +739,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
&top,
&right,
&bottom);
- UpdateTiles(left, top, right, bottom, queue, NULL, stats, &did_paint);
+ UpdateTiles(left, top, right, bottom, queue, NULL, &did_paint);
if (did_paint)
return;
// This was an attempt to paint the entire layer so if we fail it's okay,
@@ -761,7 +757,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
predicted_visible_rect_, &left, &top, &right, &bottom);
MarkOcclusionsAndRequestTextures(left, top, right, bottom, occlusion);
skips_draw_ = !UpdateTiles(
- left, top, right, bottom, queue, occlusion, stats, &did_paint);
+ left, top, right, bottom, queue, occlusion, &did_paint);
if (skips_draw_)
tiler_->reset();
if (skips_draw_ || did_paint)
@@ -774,7 +770,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
return;
// Prepaint anything that was occluded but inside the layer's visible region.
- if (!UpdateTiles(left, top, right, bottom, queue, NULL, stats, &did_paint) ||
+ if (!UpdateTiles(left, top, right, bottom, queue, NULL, &did_paint) ||
did_paint)
return;
@@ -804,7 +800,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
while (bottom < prepaint_bottom) {
++bottom;
if (!UpdateTiles(
- left, bottom, right, bottom, queue, NULL, stats, &did_paint) ||
+ left, bottom, right, bottom, queue, NULL, &did_paint) ||
did_paint)
return;
}
@@ -813,7 +809,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
while (top > prepaint_top) {
--top;
if (!UpdateTiles(
- left, top, right, top, queue, NULL, stats, &did_paint) ||
+ left, top, right, top, queue, NULL, &did_paint) ||
did_paint)
return;
}
@@ -822,7 +818,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
while (left > prepaint_left) {
--left;
if (!UpdateTiles(
- left, top, left, bottom, queue, NULL, stats, &did_paint) ||
+ left, top, left, bottom, queue, NULL, &did_paint) ||
did_paint)
return;
}
@@ -831,7 +827,7 @@ void TiledLayer::Update(ResourceUpdateQueue* queue,
while (right < prepaint_right) {
++right;
if (!UpdateTiles(
- right, top, right, bottom, queue, NULL, stats, &did_paint) ||
+ right, top, right, bottom, queue, NULL, &did_paint) ||
did_paint)
return;
}

Powered by Google App Engine
This is Rietveld 408576698