summaryrefslogtreecommitdiffstats
path: root/cc/resources
diff options
context:
space:
mode:
authoregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-27 20:01:44 +0000
committeregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-27 20:01:44 +0000
commit08c45e5ec28c949e9de0201c1693cb3d81804c8d (patch)
tree0a6f8b7f2c61630dd25e8706217777b12c998189 /cc/resources
parenta6a6e2cc5cd9a7936156613b664d38ff53926278 (diff)
downloadchromium_src-08c45e5ec28c949e9de0201c1693cb3d81804c8d.zip
chromium_src-08c45e5ec28c949e9de0201c1693cb3d81804c8d.tar.gz
chromium_src-08c45e5ec28c949e9de0201c1693cb3d81804c8d.tar.bz2
cc: Remove RenderingStats passed to ContentLayerUpdater during Layer::Update()
depends on: https://codereview.chromium.org/13265003/ BUG=181319 Review URL: https://chromiumcodereview.appspot.com/13245007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources')
-rw-r--r--cc/resources/bitmap_content_layer_updater.cc9
-rw-r--r--cc/resources/bitmap_content_layer_updater.h7
-rw-r--r--cc/resources/bitmap_skpicture_content_layer_updater.cc8
-rw-r--r--cc/resources/bitmap_skpicture_content_layer_updater.h6
-rw-r--r--cc/resources/caching_bitmap_content_layer_updater.cc6
-rw-r--r--cc/resources/caching_bitmap_content_layer_updater.h3
-rw-r--r--cc/resources/content_layer_updater.cc3
-rw-r--r--cc/resources/content_layer_updater.h3
-rw-r--r--cc/resources/image_layer_updater.cc3
-rw-r--r--cc/resources/image_layer_updater.h3
-rw-r--r--cc/resources/layer_updater.h7
-rw-r--r--cc/resources/skpicture_content_layer_updater.cc6
-rw-r--r--cc/resources/skpicture_content_layer_updater.h3
13 files changed, 23 insertions, 44 deletions
diff --git a/cc/resources/bitmap_content_layer_updater.cc b/cc/resources/bitmap_content_layer_updater.cc
index 4ad32849..3d90eb0 100644
--- a/cc/resources/bitmap_content_layer_updater.cc
+++ b/cc/resources/bitmap_content_layer_updater.cc
@@ -24,8 +24,7 @@ BitmapContentLayerUpdater::Resource::~Resource() {}
void BitmapContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats* stats) {
+ bool partial_update) {
updater_->UpdateTexture(
queue, texture(), source_rect, dest_offset, partial_update);
}
@@ -60,8 +59,7 @@ void BitmapContentLayerUpdater::PrepareToUpdate(
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) {
+ gfx::Rect* resulting_opaque_rect) {
devtools_instrumentation::ScopedLayerTask paint_layer(
devtools_instrumentation::kPaintLayer, layer_id_);
if (canvas_size_ != content_rect.size()) {
@@ -78,8 +76,7 @@ void BitmapContentLayerUpdater::PrepareToUpdate(
content_rect,
contents_width_scale,
contents_height_scale,
- resulting_opaque_rect,
- stats);
+ resulting_opaque_rect);
base::TimeDelta duration =
rendering_stats_instrumentation_->EndRecording(start_time);
rendering_stats_instrumentation_->AddPaint(
diff --git a/cc/resources/bitmap_content_layer_updater.h b/cc/resources/bitmap_content_layer_updater.h
index db270f0..2a417f0 100644
--- a/cc/resources/bitmap_content_layer_updater.h
+++ b/cc/resources/bitmap_content_layer_updater.h
@@ -30,8 +30,7 @@ class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater {
virtual void Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats* stats) OVERRIDE;
+ bool partial_update) OVERRIDE;
private:
BitmapContentLayerUpdater* updater_;
@@ -50,8 +49,7 @@ class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater {
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) OVERRIDE;
+ gfx::Rect* resulting_opaque_rect) OVERRIDE;
void UpdateTexture(ResourceUpdateQueue* queue,
PrioritizedResource* resource,
gfx::Rect source_rect,
@@ -71,6 +69,7 @@ class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater {
gfx::Size canvas_size_;
bool opaque_;
+ private:
DISALLOW_COPY_AND_ASSIGN(BitmapContentLayerUpdater);
};
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.cc b/cc/resources/bitmap_skpicture_content_layer_updater.cc
index 29ce564..9661da5 100644
--- a/cc/resources/bitmap_skpicture_content_layer_updater.cc
+++ b/cc/resources/bitmap_skpicture_content_layer_updater.cc
@@ -23,15 +23,14 @@ void BitmapSkPictureContentLayerUpdater::Resource::Update(
ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats* stats) {
+ bool partial_update) {
bitmap_.setConfig(
SkBitmap::kARGB_8888_Config, source_rect.width(), source_rect.height());
bitmap_.allocPixels();
bitmap_.setIsOpaque(updater_->layer_is_opaque());
SkDevice device(bitmap_);
SkCanvas canvas(&device);
- updater_->PaintContentsRect(&canvas, source_rect, stats);
+ updater_->PaintContentsRect(&canvas, source_rect);
ResourceUpdate upload = ResourceUpdate::Create(
texture(), &bitmap_, source_rect, source_rect, dest_offset);
@@ -71,8 +70,7 @@ BitmapSkPictureContentLayerUpdater::CreateResource(
void BitmapSkPictureContentLayerUpdater::PaintContentsRect(
SkCanvas* canvas,
- gfx::Rect source_rect,
- RenderingStats* stats) {
+ gfx::Rect source_rect) {
// Translate the origin of content_rect to that of source_rect.
canvas->translate(content_rect().x() - source_rect.x(),
content_rect().y() - source_rect.y());
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.h b/cc/resources/bitmap_skpicture_content_layer_updater.h
index c4a73c4..e03f56d 100644
--- a/cc/resources/bitmap_skpicture_content_layer_updater.h
+++ b/cc/resources/bitmap_skpicture_content_layer_updater.h
@@ -23,8 +23,7 @@ class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
virtual void Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats* stats) OVERRIDE;
+ bool partial_update) OVERRIDE;
private:
SkBitmap bitmap_;
@@ -41,8 +40,7 @@ class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* manager) OVERRIDE;
void PaintContentsRect(SkCanvas* canvas,
- gfx::Rect source_rect,
- RenderingStats* stats);
+ gfx::Rect source_rect);
private:
BitmapSkPictureContentLayerUpdater(
diff --git a/cc/resources/caching_bitmap_content_layer_updater.cc b/cc/resources/caching_bitmap_content_layer_updater.cc
index 2efd31d..f6edb40 100644
--- a/cc/resources/caching_bitmap_content_layer_updater.cc
+++ b/cc/resources/caching_bitmap_content_layer_updater.cc
@@ -37,14 +37,12 @@ void CachingBitmapContentLayerUpdater::PrepareToUpdate(
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) {
+ gfx::Rect* resulting_opaque_rect) {
BitmapContentLayerUpdater::PrepareToUpdate(content_rect,
tile_size,
contents_width_scale,
contents_height_scale,
- resulting_opaque_rect,
- stats);
+ resulting_opaque_rect);
const SkBitmap& new_bitmap = canvas_->getDevice()->accessBitmap(false);
SkAutoLockPixels lock(new_bitmap);
diff --git a/cc/resources/caching_bitmap_content_layer_updater.h b/cc/resources/caching_bitmap_content_layer_updater.h
index 33726c8..8e98890 100644
--- a/cc/resources/caching_bitmap_content_layer_updater.h
+++ b/cc/resources/caching_bitmap_content_layer_updater.h
@@ -22,8 +22,7 @@ class CachingBitmapContentLayerUpdater : public BitmapContentLayerUpdater {
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) OVERRIDE;
+ gfx::Rect* resulting_opaque_rect) OVERRIDE;
bool pixels_did_change() const {
return pixels_did_change_;
diff --git a/cc/resources/content_layer_updater.cc b/cc/resources/content_layer_updater.cc
index 32cd816..d15f02a 100644
--- a/cc/resources/content_layer_updater.cc
+++ b/cc/resources/content_layer_updater.cc
@@ -36,8 +36,7 @@ void ContentLayerUpdater::PaintContents(SkCanvas* canvas,
gfx::Rect content_rect,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) {
+ gfx::Rect* resulting_opaque_rect) {
TRACE_EVENT0("cc", "ContentLayerUpdater::PaintContents");
canvas->save();
canvas->translate(SkFloatToScalar(-content_rect.x()),
diff --git a/cc/resources/content_layer_updater.h b/cc/resources/content_layer_updater.h
index c3e2e97..6c8dee3 100644
--- a/cc/resources/content_layer_updater.h
+++ b/cc/resources/content_layer_updater.h
@@ -33,8 +33,7 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
gfx::Rect content_rect,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats);
+ gfx::Rect* resulting_opaque_rect);
gfx::Rect content_rect() const { return content_rect_; }
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
diff --git a/cc/resources/image_layer_updater.cc b/cc/resources/image_layer_updater.cc
index 378490d..6e9cdfea 100644
--- a/cc/resources/image_layer_updater.cc
+++ b/cc/resources/image_layer_updater.cc
@@ -17,8 +17,7 @@ ImageLayerUpdater::Resource::~Resource() {}
void ImageLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats*) {
+ bool partial_update) {
updater_->UpdateTexture(
queue, texture(), source_rect, dest_offset, partial_update);
}
diff --git a/cc/resources/image_layer_updater.h b/cc/resources/image_layer_updater.h
index 8155442..ec5da7a 100644
--- a/cc/resources/image_layer_updater.h
+++ b/cc/resources/image_layer_updater.h
@@ -24,8 +24,7 @@ class CC_EXPORT ImageLayerUpdater : public LayerUpdater {
virtual void Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats* stats) OVERRIDE;
+ bool partial_update) OVERRIDE;
private:
ImageLayerUpdater* updater_;
diff --git a/cc/resources/layer_updater.h b/cc/resources/layer_updater.h
index 6cfd0c4..5d8eb89 100644
--- a/cc/resources/layer_updater.h
+++ b/cc/resources/layer_updater.h
@@ -17,7 +17,6 @@ class PrioritizedResource;
class PrioritizedResourceManager;
class ResourceUpdateQueue;
class TextureManager;
-struct RenderingStats;
class CC_EXPORT LayerUpdater : public base::RefCounted<LayerUpdater> {
public:
@@ -32,8 +31,7 @@ class CC_EXPORT LayerUpdater : public base::RefCounted<LayerUpdater> {
virtual void Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats* stats) = 0;
+ bool partial_update) = 0;
protected:
explicit Resource(scoped_ptr<PrioritizedResource> texture);
@@ -54,8 +52,7 @@ class CC_EXPORT LayerUpdater : public base::RefCounted<LayerUpdater> {
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) {}
+ gfx::Rect* resulting_opaque_rect) {}
virtual void ReduceMemoryUsage() {}
// Set true by the layer when it is known that the entire output is going to
diff --git a/cc/resources/skpicture_content_layer_updater.cc b/cc/resources/skpicture_content_layer_updater.cc
index 5b46adc..e44dbc2 100644
--- a/cc/resources/skpicture_content_layer_updater.cc
+++ b/cc/resources/skpicture_content_layer_updater.cc
@@ -27,8 +27,7 @@ void SkPictureContentLayerUpdater::PrepareToUpdate(
gfx::Size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) {
+ gfx::Rect* resulting_opaque_rect) {
SkCanvas* canvas =
picture_.beginRecording(content_rect.width(), content_rect.height());
base::TimeTicks start_time =
@@ -37,8 +36,7 @@ void SkPictureContentLayerUpdater::PrepareToUpdate(
content_rect,
contents_width_scale,
contents_height_scale,
- resulting_opaque_rect,
- stats);
+ resulting_opaque_rect);
base::TimeDelta duration =
rendering_stats_instrumentation_->EndRecording(start_time);
rendering_stats_instrumentation_->AddRecord(
diff --git a/cc/resources/skpicture_content_layer_updater.h b/cc/resources/skpicture_content_layer_updater.h
index e5df995..41a9f01 100644
--- a/cc/resources/skpicture_content_layer_updater.h
+++ b/cc/resources/skpicture_content_layer_updater.h
@@ -34,8 +34,7 @@ class SkPictureContentLayerUpdater : public ContentLayerUpdater {
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect,
- RenderingStats* stats) OVERRIDE;
+ gfx::Rect* resulting_opaque_rect) OVERRIDE;
void DrawPicture(SkCanvas* canvas);
bool layer_is_opaque() const { return layer_is_opaque_; }