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

Unified Diff: cc/layers/scrollbar_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/scrollbar_layer.cc
diff --git a/cc/layers/scrollbar_layer.cc b/cc/layers/scrollbar_layer.cc
index e5e463ec78ab4e3f3ad5563c89527ea0450a6c7b..4c81d0b9bd3f7a5e4c0456cd2052f21db665f82d 100644
--- a/cc/layers/scrollbar_layer.cc
+++ b/cc/layers/scrollbar_layer.cc
@@ -271,7 +271,8 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
scrollbar_.get(),
painter_.get(),
geometry_.get(),
- WebKit::WebScrollbar::BackTrackPart).PassAs<LayerPainter>());
+ WebKit::WebScrollbar::BackTrackPart).PassAs<LayerPainter>(),
+ rendering_stats_instrumentation());
}
if (!back_track_) {
back_track_ = back_track_updater_->CreateResource(
@@ -287,7 +288,8 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
scrollbar_.get(),
painter_.get(),
geometry_.get(),
- WebKit::WebScrollbar::ForwardTrackPart).PassAs<LayerPainter>());
+ WebKit::WebScrollbar::ForwardTrackPart).PassAs<LayerPainter>(),
+ rendering_stats_instrumentation());
}
if (!fore_track_) {
fore_track_ = fore_track_updater_->CreateResource(
@@ -299,7 +301,8 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
thumb_updater_ = CachingBitmapContentLayerUpdater::Create(
ScrollbarThumbPainter::Create(scrollbar_.get(),
painter_.get(),
- geometry_.get()).PassAs<LayerPainter>());
+ geometry_.get()).PassAs<LayerPainter>(),
+ rendering_stats_instrumentation());
}
if (!thumb_) {
thumb_ = thumb_updater_->CreateResource(
@@ -310,8 +313,7 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
void ScrollbarLayer::UpdatePart(CachingBitmapContentLayerUpdater* painter,
LayerUpdater::Resource* resource,
gfx::Rect rect,
- ResourceUpdateQueue* queue,
- RenderingStats* stats) {
+ ResourceUpdateQueue* queue) {
if (layer_tree_host()->settings().solid_color_scrollbars)
return;
@@ -333,8 +335,7 @@ void ScrollbarLayer::UpdatePart(CachingBitmapContentLayerUpdater* painter,
rect.size(),
contents_scale_x(),
contents_scale_y(),
- &painted_opaque_rect,
- stats);
+ &painted_opaque_rect);
if (!painter->pixels_did_change() &&
resource->texture()->have_backing_texture()) {
TRACE_EVENT_INSTANT0("cc",
@@ -348,7 +349,7 @@ void ScrollbarLayer::UpdatePart(CachingBitmapContentLayerUpdater* painter,
resource->texture()->ReturnBackingTexture();
gfx::Vector2d dest_offset(0, 0);
- resource->Update(queue, rect, dest_offset, partial_updates_allowed, stats);
+ resource->Update(queue, rect, dest_offset, partial_updates_allowed);
}
gfx::Rect ScrollbarLayer::ScrollbarLayerRectToContentRect(
@@ -395,9 +396,8 @@ void ScrollbarLayer::SetTexturePriorities(
}
void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
- ContentsScalingLayer::Update(queue, occlusion, stats);
+ const OcclusionTracker* occlusion) {
+ ContentsScalingLayer::Update(queue, occlusion);
dirty_rect_.Union(update_rect_);
if (content_bounds().IsEmpty())
@@ -412,14 +412,12 @@ void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
UpdatePart(back_track_updater_.get(),
back_track_.get(),
content_rect,
- queue,
- stats);
+ queue);
if (fore_track_ && fore_track_updater_) {
UpdatePart(fore_track_updater_.get(),
fore_track_.get(),
content_rect,
- queue,
- stats);
+ queue);
}
// Consider the thumb to be at the origin when painting.
@@ -431,8 +429,7 @@ void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
UpdatePart(thumb_updater_.get(),
thumb_.get(),
origin_thumb_rect,
- queue,
- stats);
+ queue);
}
dirty_rect_ = gfx::RectF();

Powered by Google App Engine
This is Rietveld 408576698