summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/debug/rendering_stats_instrumentation.cc8
-rw-r--r--cc/debug/rendering_stats_instrumentation.h4
-rw-r--r--cc/layers/content_layer.cc5
-rw-r--r--cc/layers/content_layer.h3
-rw-r--r--cc/layers/contents_scaling_layer.cc3
-rw-r--r--cc/layers/contents_scaling_layer.h3
-rw-r--r--cc/layers/heads_up_display_layer.cc3
-rw-r--r--cc/layers/heads_up_display_layer.h3
-rw-r--r--cc/layers/image_layer.cc5
-rw-r--r--cc/layers/image_layer.h3
-rw-r--r--cc/layers/layer.h4
-rw-r--r--cc/layers/nine_patch_layer.cc3
-rw-r--r--cc/layers/nine_patch_layer.h3
-rw-r--r--cc/layers/nine_patch_layer_unittest.cc10
-rw-r--r--cc/layers/picture_layer.cc3
-rw-r--r--cc/layers/picture_layer.h4
-rw-r--r--cc/layers/scrollbar_layer.cc14
-rw-r--r--cc/layers/scrollbar_layer.h6
-rw-r--r--cc/layers/scrollbar_layer_unittest.cc4
-rw-r--r--cc/layers/texture_layer.cc3
-rw-r--r--cc/layers/texture_layer.h3
-rw-r--r--cc/layers/tiled_layer.cc25
-rw-r--r--cc/layers/tiled_layer.h7
-rw-r--r--cc/layers/tiled_layer_unittest.cc70
-rw-r--r--cc/test/fake_content_layer.cc5
-rw-r--r--cc/test/fake_content_layer.h3
-rw-r--r--cc/test/fake_picture_layer.cc5
-rw-r--r--cc/test/fake_picture_layer.h3
-rw-r--r--cc/test/fake_scrollbar_layer.cc5
-rw-r--r--cc/test/fake_scrollbar_layer.h3
-rw-r--r--cc/trees/layer_tree_host.cc18
-rw-r--r--cc/trees/layer_tree_host.h3
-rw-r--r--cc/trees/layer_tree_host_unittest.cc11
-rw-r--r--cc/trees/layer_tree_host_unittest_occlusion.cc3
34 files changed, 99 insertions, 159 deletions
diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc
index e23ce95..b6d1217 100644
--- a/cc/debug/rendering_stats_instrumentation.cc
+++ b/cc/debug/rendering_stats_instrumentation.cc
@@ -36,14 +36,6 @@ base::TimeDelta RenderingStatsInstrumentation::EndRecording(
return base::TimeDelta();
}
-void RenderingStatsInstrumentation::AddStats(const RenderingStats& other) {
- if (!record_rendering_stats_)
- return;
-
- base::AutoLock scoped_lock(lock_);
- rendering_stats_.Add(other);
-}
-
void RenderingStatsInstrumentation::IncrementAnimationFrameCount() {
if (!record_rendering_stats_)
return;
diff --git a/cc/debug/rendering_stats_instrumentation.h b/cc/debug/rendering_stats_instrumentation.h
index f3b6f65..daeb335 100644
--- a/cc/debug/rendering_stats_instrumentation.h
+++ b/cc/debug/rendering_stats_instrumentation.h
@@ -32,10 +32,6 @@ class CC_EXPORT RenderingStatsInstrumentation {
base::TimeTicks StartRecording() const;
base::TimeDelta EndRecording(base::TimeTicks start_time) const;
- // TODO(egraether): Remove after switching Layer::update() to use this class.
- // Used in LayerTreeHost::paintLayerContents().
- void AddStats(const RenderingStats& other);
-
void IncrementAnimationFrameCount();
void SetScreenFrameCount(int64 count);
void SetDroppedFrameCount(int64 count);
diff --git a/cc/layers/content_layer.cc b/cc/layers/content_layer.cc
index 19db897..1d1f8ef 100644
--- a/cc/layers/content_layer.cc
+++ b/cc/layers/content_layer.cc
@@ -82,8 +82,7 @@ void ContentLayer::SetTexturePriorities(
}
void ContentLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
{
base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_,
true);
@@ -92,7 +91,7 @@ void ContentLayer::Update(ResourceUpdateQueue* queue,
UpdateCanUseLCDText();
}
- TiledLayer::Update(queue, occlusion, stats);
+ TiledLayer::Update(queue, occlusion);
needs_display_ = false;
}
diff --git a/cc/layers/content_layer.h b/cc/layers/content_layer.h
index 2b8392e..fc334c7 100644
--- a/cc/layers/content_layer.h
+++ b/cc/layers/content_layer.h
@@ -45,8 +45,7 @@ class CC_EXPORT ContentLayer : public TiledLayer {
virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
OVERRIDE;
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual bool NeedMoreUpdates() OVERRIDE;
virtual void SetContentsOpaque(bool contents_opaque) OVERRIDE;
diff --git a/cc/layers/contents_scaling_layer.cc b/cc/layers/contents_scaling_layer.cc
index 3ecb99b..e7c4232 100644
--- a/cc/layers/contents_scaling_layer.cc
+++ b/cc/layers/contents_scaling_layer.cc
@@ -37,8 +37,7 @@ void ContentsScalingLayer::CalculateContentsScale(
void ContentsScalingLayer::Update(
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
if (draw_properties().contents_scale_x == last_update_contents_scale_x_ &&
draw_properties().contents_scale_y == last_update_contents_scale_y_)
return;
diff --git a/cc/layers/contents_scaling_layer.h b/cc/layers/contents_scaling_layer.h
index a34a69b..bb7ce79 100644
--- a/cc/layers/contents_scaling_layer.h
+++ b/cc/layers/contents_scaling_layer.h
@@ -25,8 +25,7 @@ class CC_EXPORT ContentsScalingLayer : public Layer {
virtual void Update(
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
protected:
ContentsScalingLayer();
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index 7822516..4d6351d 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -23,8 +23,7 @@ HeadsUpDisplayLayer::HeadsUpDisplayLayer() : Layer() {
HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*,
- const OcclusionTracker*,
- RenderingStats*) {
+ const OcclusionTracker*) {
const LayerTreeDebugState& debug_state = layer_tree_host()->debug_state();
int max_texture_size =
layer_tree_host()->GetRendererCapabilities().max_texture_size;
diff --git a/cc/layers/heads_up_display_layer.h b/cc/layers/heads_up_display_layer.h
index 31294d8..c81d47e 100644
--- a/cc/layers/heads_up_display_layer.h
+++ b/cc/layers/heads_up_display_layer.h
@@ -16,8 +16,7 @@ class CC_EXPORT HeadsUpDisplayLayer : public Layer {
static scoped_refptr<HeadsUpDisplayLayer> Create();
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* tracker,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* tracker) OVERRIDE;
virtual bool DrawsContent() const OVERRIDE;
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
diff --git a/cc/layers/image_layer.cc b/cc/layers/image_layer.cc
index c4f948c..b7b1578 100644
--- a/cc/layers/image_layer.cc
+++ b/cc/layers/image_layer.cc
@@ -41,8 +41,7 @@ void ImageLayer::SetTexturePriorities(const PriorityCalculator& priority_calc) {
}
void ImageLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
CreateUpdaterIfNeeded();
if (needs_display_) {
updater_->set_bitmap(bitmap_);
@@ -50,7 +49,7 @@ void ImageLayer::Update(ResourceUpdateQueue* queue,
InvalidateContentRect(gfx::Rect(content_bounds()));
needs_display_ = false;
}
- TiledLayer::Update(queue, occlusion, stats);
+ TiledLayer::Update(queue, occlusion);
}
void ImageLayer::CreateUpdaterIfNeeded() {
diff --git a/cc/layers/image_layer.h b/cc/layers/image_layer.h
index 7fe7154..a8a9a97 100644
--- a/cc/layers/image_layer.h
+++ b/cc/layers/image_layer.h
@@ -23,8 +23,7 @@ class CC_EXPORT ImageLayer : public TiledLayer {
virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
OVERRIDE;
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual void CalculateContentsScale(float ideal_contents_scale,
float device_scale_factor,
float page_scale_factor,
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 51a91cb..73123b9 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -50,7 +50,6 @@ class RenderingStatsInstrumentation;
class ResourceUpdateQueue;
class ScrollbarLayer;
struct AnimationEvent;
-struct RenderingStats;
// Base class for composited layers. Special layer types are derived from
// this class.
@@ -286,8 +285,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
virtual bool DrawsContent() const;
virtual void SavePaintProperties();
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {}
+ const OcclusionTracker* occlusion) {}
virtual bool NeedMoreUpdates();
virtual void SetIsMask(bool is_mask) {}
virtual void ReduceMemoryUsage() {}
diff --git a/cc/layers/nine_patch_layer.cc b/cc/layers/nine_patch_layer.cc
index 8003f67..d15e6f1 100644
--- a/cc/layers/nine_patch_layer.cc
+++ b/cc/layers/nine_patch_layer.cc
@@ -55,8 +55,7 @@ void NinePatchLayer::SetBitmap(const SkBitmap& bitmap, gfx::Rect aperture) {
}
void NinePatchLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
CreateUpdaterIfNeeded();
if (resource_ &&
diff --git a/cc/layers/nine_patch_layer.h b/cc/layers/nine_patch_layer.h
index 9d6498c..f1a98d4 100644
--- a/cc/layers/nine_patch_layer.h
+++ b/cc/layers/nine_patch_layer.h
@@ -24,8 +24,7 @@ class CC_EXPORT NinePatchLayer : public Layer {
virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
OVERRIDE;
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
// aperture is in the pixel space of the bitmap resource and refers to
diff --git a/cc/layers/nine_patch_layer_unittest.cc b/cc/layers/nine_patch_layer_unittest.cc
index 69edc2c..73dd317 100644
--- a/cc/layers/nine_patch_layer_unittest.cc
+++ b/cc/layers/nine_patch_layer_unittest.cc
@@ -72,7 +72,7 @@ TEST_F(NinePatchLayerTest, TriggerFullUploadOnceWhenChangingBitmap) {
// No bitmap set should not trigger any uploads.
test_layer->SetTexturePriorities(calculator);
- test_layer->Update(&queue, &occlusion_tracker, NULL);
+ test_layer->Update(&queue, &occlusion_tracker);
EXPECT_EQ(0u, queue.FullUploadSize());
EXPECT_EQ(0u, queue.PartialUploadSize());
@@ -82,7 +82,7 @@ TEST_F(NinePatchLayerTest, TriggerFullUploadOnceWhenChangingBitmap) {
bitmap.allocPixels();
test_layer->SetBitmap(bitmap, gfx::Rect(5, 5, 1, 1));
test_layer->SetTexturePriorities(calculator);
- test_layer->Update(&queue, &occlusion_tracker, NULL);
+ test_layer->Update(&queue, &occlusion_tracker);
EXPECT_EQ(1u, queue.FullUploadSize());
EXPECT_EQ(0u, queue.PartialUploadSize());
ResourceUpdate params = queue.TakeFirstFullUpload();
@@ -106,7 +106,7 @@ TEST_F(NinePatchLayerTest, TriggerFullUploadOnceWhenChangingBitmap) {
// Nothing changed, so no repeated upload.
test_layer->SetTexturePriorities(calculator);
- test_layer->Update(&queue, &occlusion_tracker, NULL);
+ test_layer->Update(&queue, &occlusion_tracker);
EXPECT_EQ(0u, queue.FullUploadSize());
EXPECT_EQ(0u, queue.PartialUploadSize());
{
@@ -118,7 +118,7 @@ TEST_F(NinePatchLayerTest, TriggerFullUploadOnceWhenChangingBitmap) {
// Reupload after eviction
test_layer->SetTexturePriorities(calculator);
- test_layer->Update(&queue, &occlusion_tracker, NULL);
+ test_layer->Update(&queue, &occlusion_tracker);
EXPECT_EQ(1u, queue.FullUploadSize());
EXPECT_EQ(0u, queue.PartialUploadSize());
@@ -128,7 +128,7 @@ TEST_F(NinePatchLayerTest, TriggerFullUploadOnceWhenChangingBitmap) {
EXPECT_EQ(NULL, params.texture->resource_manager());
test_layer->SetTexturePriorities(calculator);
ResourceUpdateQueue queue2;
- test_layer->Update(&queue2, &occlusion_tracker, NULL);
+ test_layer->Update(&queue2, &occlusion_tracker);
EXPECT_EQ(1u, queue2.FullUploadSize());
EXPECT_EQ(0u, queue2.PartialUploadSize());
params = queue2.TakeFirstFullUpload();
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 0187443..3f91f29 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -74,8 +74,7 @@ void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) {
}
void PictureLayer::Update(ResourceUpdateQueue*,
- const OcclusionTracker*,
- RenderingStats* stats) {
+ const OcclusionTracker*) {
// Do not early-out of this function so that PicturePile::Update has a chance
// to record pictures due to changing visibility of this layer.
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h
index bb5892a..a5c0714 100644
--- a/cc/layers/picture_layer.h
+++ b/cc/layers/picture_layer.h
@@ -15,7 +15,6 @@ namespace cc {
class ContentLayerClient;
class ResourceUpdateQueue;
-struct RenderingStats;
class CC_EXPORT PictureLayer : public ContentsScalingLayer {
public:
@@ -32,8 +31,7 @@ class CC_EXPORT PictureLayer : public ContentsScalingLayer {
virtual void SetNeedsDisplayRect(const gfx::RectF& layer_rect) OVERRIDE;
virtual void Update(
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual void SetIsMask(bool is_mask) OVERRIDE;
virtual bool SupportsLCDText() const OVERRIDE;
diff --git a/cc/layers/scrollbar_layer.cc b/cc/layers/scrollbar_layer.cc
index bc88a2c..f2c46a8 100644
--- a/cc/layers/scrollbar_layer.cc
+++ b/cc/layers/scrollbar_layer.cc
@@ -210,8 +210,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;
@@ -291,8 +290,7 @@ void ScrollbarLayer::SetTexturePriorities(
}
void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
track_rect_ = scrollbar_->TrackRect();
if (layer_tree_host()->settings().solid_color_scrollbars)
@@ -301,7 +299,7 @@ void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
{
base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_,
true);
- ContentsScalingLayer::Update(queue, occlusion, stats);
+ ContentsScalingLayer::Update(queue, occlusion);
}
dirty_rect_.Union(update_rect_);
@@ -317,8 +315,7 @@ void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
UpdatePart(track_updater_.get(),
track_.get(),
content_rect,
- queue,
- stats);
+ queue);
if (scrollbar_->HasThumb()) {
thumb_thickness_ = scrollbar_->ThumbThickness();
@@ -328,8 +325,7 @@ void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
UpdatePart(thumb_updater_.get(),
thumb_.get(),
origin_thumb_rect,
- queue,
- stats);
+ queue);
}
}
diff --git a/cc/layers/scrollbar_layer.h b/cc/layers/scrollbar_layer.h
index cc14acf..a6c4a01 100644
--- a/cc/layers/scrollbar_layer.h
+++ b/cc/layers/scrollbar_layer.h
@@ -36,8 +36,7 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
OVERRIDE;
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
virtual void CalculateContentsScale(float ideal_contents_scale,
@@ -59,8 +58,7 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
void UpdatePart(CachingBitmapContentLayerUpdater* painter,
LayerUpdater::Resource* resource,
gfx::Rect rect,
- ResourceUpdateQueue* queue,
- RenderingStats* stats);
+ ResourceUpdateQueue* queue);
void CreateUpdaterIfNeeded();
gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const;
gfx::Rect OriginThumbRect() const;
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index aa97294..f8b009b 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -468,7 +468,7 @@ class ScrollbarLayerTestResourceCreation : public testing::Test {
scrollbar_layer->SetTexturePriorities(calculator);
layer_tree_host_->contents_texture_manager()->PrioritizeTextures();
- scrollbar_layer->Update(&queue, &occlusion_tracker, NULL);
+ scrollbar_layer->Update(&queue, &occlusion_tracker);
EXPECT_EQ(0u, queue.FullUploadSize());
EXPECT_EQ(expected_resources, queue.PartialUploadSize());
@@ -547,7 +547,7 @@ class ScaledScrollbarLayerTestResourceCreation : public testing::Test {
scrollbar_layer->SetTexturePriorities(calculator);
layer_tree_host_->contents_texture_manager()->PrioritizeTextures();
- scrollbar_layer->Update(&queue, &occlusion_tracker, NULL);
+ scrollbar_layer->Update(&queue, &occlusion_tracker);
EXPECT_EQ(expected_resources, queue.PartialUploadSize());
// Verify that we have not generated any content uploads that are larger
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index 25b9b8f..9e9dff8 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -167,8 +167,7 @@ bool TextureLayer::DrawsContent() const {
}
void TextureLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
if (client_) {
if (uses_mailbox_) {
TextureMailbox mailbox;
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h
index 6be2a01..e3132fd 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -76,8 +76,7 @@ class CC_EXPORT TextureLayer : public Layer {
virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE;
virtual bool DrawsContent() const OVERRIDE;
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
virtual bool BlocksPendingCommit() const OVERRIDE;
diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc
index f7d1ff9..4ed9dee 100644
--- a/cc/layers/tiled_layer.cc
+++ b/cc/layers/tiled_layer.cc
@@ -322,7 +322,6 @@ bool TiledLayer::UpdateTiles(int left,
int bottom,
ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion,
- RenderingStats* stats,
bool* did_paint) {
*did_paint = false;
CreateUpdaterIfNeeded();
@@ -344,7 +343,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;
}
@@ -470,8 +469,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 =
@@ -726,14 +724,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();
}
@@ -752,7 +749,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,
@@ -770,7 +767,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)
@@ -783,7 +780,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;
@@ -813,7 +810,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;
}
@@ -822,7 +819,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;
}
@@ -831,7 +828,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;
}
@@ -840,7 +837,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;
}
diff --git a/cc/layers/tiled_layer.h b/cc/layers/tiled_layer.h
index c433fcf..ae527e7 100644
--- a/cc/layers/tiled_layer.h
+++ b/cc/layers/tiled_layer.h
@@ -35,8 +35,7 @@ class CC_EXPORT TiledLayer : public ContentsScalingLayer {
OVERRIDE;
virtual Region VisibleContentOpaqueRegion() const OVERRIDE;
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
protected:
TiledLayer();
@@ -97,7 +96,6 @@ class CC_EXPORT TiledLayer : public ContentsScalingLayer {
int bottom,
ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion,
- RenderingStats* stats,
bool* did_paint);
bool HaveTexturesForTiles(int left,
int top,
@@ -115,8 +113,7 @@ class CC_EXPORT TiledLayer : public ContentsScalingLayer {
int right,
int bottom,
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats);
+ const OcclusionTracker* occlusion);
void UpdateScrollPrediction();
UpdatableTile* TileAt(int i, int j) const;
diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc
index ae07e40..6c7ba8a 100644
--- a/cc/layers/tiled_layer_unittest.cc
+++ b/cc/layers/tiled_layer_unittest.cc
@@ -114,7 +114,7 @@ class TiledLayerTest : public testing::Test {
void LayerUpdate(FakeTiledLayer* layer, TestOcclusionTracker* occluded) {
DebugScopedSetMainThread main_thread(proxy_);
- layer->Update(queue_.get(), occluded, NULL);
+ layer->Update(queue_.get(), occluded);
}
void CalcDrawProps(const scoped_refptr<FakeTiledLayer>& layer1) {
@@ -172,9 +172,9 @@ class TiledLayerTest : public testing::Test {
// Update content
if (layer1.get())
- layer1->Update(queue_.get(), occlusion_, NULL);
+ layer1->Update(queue_.get(), occlusion_);
if (layer2.get())
- layer2->Update(queue_.get(), occlusion_, NULL);
+ layer2->Update(queue_.get(), occlusion_);
bool needs_update = false;
if (layer1.get())
@@ -616,7 +616,7 @@ TEST_F(TiledLayerTest, PaintSmallAnimatedLayersImmediately) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
UpdateTextures();
LayerPushPropertiesTo(layer.get(), layer_impl.get());
@@ -784,7 +784,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 300, 300 * 0.8), layer->update_rect());
UpdateTextures();
@@ -794,7 +794,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) {
resource_manager_->PrioritizeTextures();
layer->InvalidateContentRect(content_bounds);
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
EXPECT_FLOAT_RECT_EQ(gfx::RectF(layer_bounds), layer->update_rect());
UpdateTextures();
@@ -805,7 +805,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
EXPECT_FLOAT_RECT_EQ(gfx::RectF(45, 80, 15, 8), layer->update_rect());
}
@@ -826,7 +826,7 @@ TEST_F(TiledLayerTest, VerifyInvalidationWhenContentsScaleChanges) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
UpdateTextures();
LayerPushPropertiesTo(layer.get(), layer_impl.get());
EXPECT_TRUE(layer_impl->HasResourceIdForTileAt(0, 0));
@@ -845,7 +845,7 @@ TEST_F(TiledLayerTest, VerifyInvalidationWhenContentsScaleChanges) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
UpdateTextures();
LayerPushPropertiesTo(layer.get(), layer_impl.get());
EXPECT_TRUE(layer_impl->HasResourceIdForTileAt(0, 0));
@@ -927,7 +927,7 @@ TEST_F(TiledLayerTest, ResizeToSmaller) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
layer->SetBounds(gfx::Size(200, 200));
layer->InvalidateContentRect(gfx::Rect(0, 0, 200, 200));
@@ -946,7 +946,7 @@ TEST_F(TiledLayerTest, HugeLayerUpdateCrash) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
}
class TiledLayerPartialUpdateTest : public TiledLayerTest {
@@ -1078,7 +1078,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithoutOcclusion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
EXPECT_EQ(2, layer->fake_layer_updater()->update_count());
}
@@ -1104,7 +1104,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(36 - 3, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1119,7 +1119,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusion) {
occluded.SetOcclusion(gfx::Rect(250, 200, 300, 100));
layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(36 - 2, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1135,7 +1135,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusion) {
occluded.SetOcclusion(gfx::Rect(250, 250, 300, 100));
layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(36, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1167,7 +1167,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndVisiblityConstraints) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(24 - 3, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1186,7 +1186,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndVisiblityConstraints) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(24 - 6, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1206,7 +1206,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndVisiblityConstraints) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(24 - 6, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1235,7 +1235,7 @@ TEST_F(TiledLayerTest, TilesNotPaintedWithoutInvalidation) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(36 - 3, layer->fake_layer_updater()->update_count());
{ UpdateTextures(); }
@@ -1251,7 +1251,7 @@ TEST_F(TiledLayerTest, TilesNotPaintedWithoutInvalidation) {
// Repaint without marking it dirty. The 3 culled tiles will be pre-painted
// now.
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(3, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1287,7 +1287,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndTransforms) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
EXPECT_EQ(36 - 3, layer->fake_layer_updater()->update_count());
EXPECT_NEAR(occluded.overdraw_metrics()->pixels_uploaded_opaque(), 0, 1);
@@ -1332,7 +1332,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndScaling) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
int visible_tiles1 = 6 * 6;
EXPECT_EQ(visible_tiles1, layer->fake_layer_updater()->update_count());
@@ -1354,7 +1354,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndScaling) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
int visible_tiles2 = 6 * 6 - 3;
EXPECT_EQ(visible_tiles2, layer->fake_layer_updater()->update_count());
@@ -1387,7 +1387,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndScaling) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
int visible_tiles3 = 6 * 6 - 6;
EXPECT_EQ(visible_tiles3, layer->fake_layer_updater()->update_count());
@@ -1428,7 +1428,7 @@ TEST_F(TiledLayerTest, VisibleContentOpaqueRegion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_TRUE(opaque_contents.IsEmpty());
@@ -1446,7 +1446,7 @@ TEST_F(TiledLayerTest, VisibleContentOpaqueRegion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
UpdateTextures();
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_EQ(gfx::IntersectRects(opaque_paint_rect, visible_bounds).ToString(),
@@ -1464,7 +1464,7 @@ TEST_F(TiledLayerTest, VisibleContentOpaqueRegion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
UpdateTextures();
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_EQ(gfx::IntersectRects(opaque_paint_rect, visible_bounds).ToString(),
@@ -1484,7 +1484,7 @@ TEST_F(TiledLayerTest, VisibleContentOpaqueRegion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
UpdateTextures();
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_EQ(gfx::IntersectRects(opaque_paint_rect, visible_bounds).ToString(),
@@ -1504,7 +1504,7 @@ TEST_F(TiledLayerTest, VisibleContentOpaqueRegion) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
UpdateTextures();
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_EQ(gfx::IntersectRects(gfx::Rect(10, 100, 90, 100),
@@ -1543,7 +1543,7 @@ TEST_F(TiledLayerTest, Pixels_paintedMetrics) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
UpdateTextures();
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_TRUE(opaque_contents.IsEmpty());
@@ -1563,7 +1563,7 @@ TEST_F(TiledLayerTest, Pixels_paintedMetrics) {
layer->SetTexturePriorities(priority_calculator_);
resource_manager_->PrioritizeTextures();
layer->SavePaintProperties();
- layer->Update(queue_.get(), &occluded, NULL);
+ layer->Update(queue_.get(), &occluded);
UpdateTextures();
opaque_contents = layer->VisibleContentOpaqueRegion();
EXPECT_TRUE(opaque_contents.IsEmpty());
@@ -1804,7 +1804,7 @@ TEST_F(TiledLayerTest, NonIntegerContentsScaleIsNotDistortedDuringPaint) {
layer->SavePaintProperties();
// Update the whole tile.
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
layer->tracking_layer_painter()->ResetPaintedRect();
EXPECT_RECT_EQ(gfx::Rect(), layer->tracking_layer_painter()->PaintedRect());
@@ -1813,7 +1813,7 @@ TEST_F(TiledLayerTest, NonIntegerContentsScaleIsNotDistortedDuringPaint) {
// Invalidate the entire layer in content space. When painting, the rect given
// to webkit should match the layer's bounds.
layer->InvalidateContentRect(content_rect);
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
}
@@ -1837,7 +1837,7 @@ TEST_F(TiledLayerTest,
layer->SavePaintProperties();
// Update the whole tile.
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
layer->tracking_layer_painter()->ResetPaintedRect();
EXPECT_RECT_EQ(gfx::Rect(), layer->tracking_layer_painter()->PaintedRect());
@@ -1846,7 +1846,7 @@ TEST_F(TiledLayerTest,
// Invalidate the entire layer in layer space. When painting, the rect given
// to webkit should match the layer's bounds.
layer->SetNeedsDisplayRect(layer_rect);
- layer->Update(queue_.get(), 0, NULL);
+ layer->Update(queue_.get(), NULL);
EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
}
diff --git a/cc/test/fake_content_layer.cc b/cc/test/fake_content_layer.cc
index 384521c..a30ea95 100644
--- a/cc/test/fake_content_layer.cc
+++ b/cc/test/fake_content_layer.cc
@@ -25,9 +25,8 @@ scoped_ptr<LayerImpl> FakeContentLayer::CreateLayerImpl(
}
void FakeContentLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
- ContentLayer::Update(queue, occlusion, stats);
+ const OcclusionTracker* occlusion) {
+ ContentLayer::Update(queue, occlusion);
update_count_++;
}
diff --git a/cc/test/fake_content_layer.h b/cc/test/fake_content_layer.h
index 52fea8f..cf8066a 100644
--- a/cc/test/fake_content_layer.h
+++ b/cc/test/fake_content_layer.h
@@ -24,8 +24,7 @@ class FakeContentLayer : public ContentLayer {
virtual void Update(
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
bool HaveBackingAt(int i, int j);
diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc
index 28365111..d166d12 100644
--- a/cc/test/fake_picture_layer.cc
+++ b/cc/test/fake_picture_layer.cc
@@ -24,9 +24,8 @@ scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
}
void FakePictureLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
- PictureLayer::Update(queue, occlusion, stats);
+ const OcclusionTracker* occlusion) {
+ PictureLayer::Update(queue, occlusion);
update_count_++;
}
diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h
index b1a9eab..442ed64 100644
--- a/cc/test/fake_picture_layer.h
+++ b/cc/test/fake_picture_layer.h
@@ -25,8 +25,7 @@ class FakePictureLayer : public PictureLayer {
virtual void Update(
ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
private:
explicit FakePictureLayer(ContentLayerClient* client);
diff --git a/cc/test/fake_scrollbar_layer.cc b/cc/test/fake_scrollbar_layer.cc
index 738a415..a75edd2 100644
--- a/cc/test/fake_scrollbar_layer.cc
+++ b/cc/test/fake_scrollbar_layer.cc
@@ -27,11 +27,10 @@ FakeScrollbarLayer::FakeScrollbarLayer(bool paint_during_update,
FakeScrollbarLayer::~FakeScrollbarLayer() {}
void FakeScrollbarLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) {
+ const OcclusionTracker* occlusion) {
size_t full = queue->FullUploadSize();
size_t partial = queue->PartialUploadSize();
- ScrollbarLayer::Update(queue, occlusion, stats);
+ ScrollbarLayer::Update(queue, occlusion);
update_count_++;
last_update_full_upload_size_ = queue->FullUploadSize() - full;
last_update_partial_upload_size_ = queue->PartialUploadSize() - partial;
diff --git a/cc/test/fake_scrollbar_layer.h b/cc/test/fake_scrollbar_layer.h
index f06f752..8d0d624 100644
--- a/cc/test/fake_scrollbar_layer.h
+++ b/cc/test/fake_scrollbar_layer.h
@@ -29,8 +29,7 @@ class FakeScrollbarLayer : public ScrollbarLayer {
}
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
+ const OcclusionTracker* occlusion) OVERRIDE;
private:
FakeScrollbarLayer(bool paint_during_update,
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 3d97f15..73df3c5 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -880,8 +880,7 @@ size_t LayerTreeHost::CalculateMemoryForRenderSurfaces(
}
bool LayerTreeHost::PaintMasksForRenderSurface(Layer* render_surface_layer,
- ResourceUpdateQueue* queue,
- RenderingStats* stats) {
+ ResourceUpdateQueue* queue) {
// Note: Masks and replicas only exist for layers that own render surfaces. If
// we reach this point in code, we already know that at least something will
// be drawn into this render surface, so the mask and replica should be
@@ -890,7 +889,7 @@ bool LayerTreeHost::PaintMasksForRenderSurface(Layer* render_surface_layer,
bool need_more_updates = false;
Layer* mask_layer = render_surface_layer->mask_layer();
if (mask_layer) {
- mask_layer->Update(queue, NULL, stats);
+ mask_layer->Update(queue, NULL);
need_more_updates |= mask_layer->NeedMoreUpdates();
}
@@ -898,7 +897,7 @@ bool LayerTreeHost::PaintMasksForRenderSurface(Layer* render_surface_layer,
render_surface_layer->replica_layer() ?
render_surface_layer->replica_layer()->mask_layer() : NULL;
if (replica_mask_layer) {
- replica_mask_layer->Update(queue, NULL, stats);
+ replica_mask_layer->Update(queue, NULL);
need_more_updates |= replica_mask_layer->NeedMoreUpdates();
}
return need_more_updates;
@@ -926,11 +925,6 @@ bool LayerTreeHost::PaintLayerContents(
PrioritizeTextures(render_surface_layer_list,
occlusion_tracker.overdraw_metrics());
- // TODO(egraether): Use RenderingStatsInstrumentation in Layer::update()
- RenderingStats stats;
- RenderingStats* stats_ptr =
- debug_state_.RecordRenderingStats() ? &stats : NULL;
-
in_paint_layer_contents_ = true;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list);
@@ -944,10 +938,10 @@ bool LayerTreeHost::PaintLayerContents(
if (it.represents_target_render_surface()) {
DCHECK(it->render_surface()->draw_opacity() ||
it->render_surface()->draw_opacity_is_animating());
- need_more_updates |= PaintMasksForRenderSurface(*it, queue, stats_ptr);
+ need_more_updates |= PaintMasksForRenderSurface(*it, queue);
} else if (it.represents_itself()) {
DCHECK(!it->paint_properties().bounds.IsEmpty());
- it->Update(queue, &occlusion_tracker, stats_ptr);
+ it->Update(queue, &occlusion_tracker);
need_more_updates |= it->NeedMoreUpdates();
}
@@ -956,8 +950,6 @@ bool LayerTreeHost::PaintLayerContents(
in_paint_layer_contents_ = false;
- rendering_stats_instrumentation_->AddStats(stats);
-
occlusion_tracker.overdraw_metrics()->RecordMetrics(this);
return need_more_updates;
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 0cd37a6..2b162fd 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -271,8 +271,7 @@ class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) {
bool PaintLayerContents(const LayerList& render_surface_layer_list,
ResourceUpdateQueue* quue);
bool PaintMasksForRenderSurface(Layer* render_surface_layer,
- ResourceUpdateQueue* queue,
- RenderingStats* stats);
+ ResourceUpdateQueue* queue);
void UpdateLayers(Layer* root_layer, ResourceUpdateQueue* queue);
void UpdateHudLayer();
void TriggerPrepaint();
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 1b10e41..f85e598 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -945,9 +945,8 @@ class ContentLayerWithUpdateTracking : public ContentLayer {
void ResetPaintContentsCount() { paint_contents_count_ = 0; }
virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE {
- ContentLayer::Update(queue, occlusion, stats);
+ const OcclusionTracker* occlusion) OVERRIDE {
+ ContentLayer::Update(queue, occlusion);
paint_contents_count_++;
}
@@ -1608,8 +1607,7 @@ class EvictionTestLayer : public Layer {
}
virtual void Update(ResourceUpdateQueue*,
- const OcclusionTracker*,
- RenderingStats*) OVERRIDE;
+ const OcclusionTracker*) OVERRIDE;
virtual bool DrawsContent() const OVERRIDE { return true; }
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
@@ -1669,8 +1667,7 @@ void EvictionTestLayer::SetTexturePriorities(const PriorityCalculator&) {
}
void EvictionTestLayer::Update(ResourceUpdateQueue* queue,
- const OcclusionTracker*,
- RenderingStats*) {
+ const OcclusionTracker*) {
CreateTextureIfNeeded();
if (!texture_)
return;
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index a723e47..beaedc1 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -19,8 +19,7 @@ class TestLayer : public Layer {
virtual void Update(
ResourceUpdateQueue* update_queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE {
+ const OcclusionTracker* occlusion) OVERRIDE {
if (!occlusion)
return;