summaryrefslogtreecommitdiffstats
path: root/cc/resources/bitmap_content_layer_updater.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-28 03:53:29 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-28 03:53:29 +0000
commitb3b5d0affe4c58208decd4a327812e202510a9e9 (patch)
tree45c0bce01a599f5e1221251302f492f48ac91d07 /cc/resources/bitmap_content_layer_updater.cc
parent67ea507fbee5b2d1647f3b86a60c36e8ba40c797 (diff)
downloadchromium_src-b3b5d0affe4c58208decd4a327812e202510a9e9.zip
chromium_src-b3b5d0affe4c58208decd4a327812e202510a9e9.tar.gz
chromium_src-b3b5d0affe4c58208decd4a327812e202510a9e9.tar.bz2
Revert 191086 "cc: Switch RenderingStats collection in Layer::Up..."
Looks like its DCHECKing on Win Aura interactive_ui_tests again. Same error as before. http://build.chromium.org/p/chromium.win/buildstatus?builder=Win%20Aura%20Tests%20%283%29&number=2148 > cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation > > This change switches all of the remaining RenderingStats collection in > composited mode to use RenderinStatsInstrumentation. > > BUG=181319 > > > Review URL: https://chromiumcodereview.appspot.com/12426024 TBR=egraether@chromium.org Review URL: https://codereview.chromium.org/13145002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191101 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/bitmap_content_layer_updater.cc')
-rw-r--r--cc/resources/bitmap_content_layer_updater.cc32
1 files changed, 15 insertions, 17 deletions
diff --git a/cc/resources/bitmap_content_layer_updater.cc b/cc/resources/bitmap_content_layer_updater.cc
index 93f5807..5365c4c 100644
--- a/cc/resources/bitmap_content_layer_updater.cc
+++ b/cc/resources/bitmap_content_layer_updater.cc
@@ -4,7 +4,7 @@
#include "cc/resources/bitmap_content_layer_updater.h"
-#include "cc/debug/rendering_stats_instrumentation.h"
+#include "cc/debug/rendering_stats.h"
#include "cc/resources/layer_painter.h"
#include "cc/resources/prioritized_resource.h"
#include "cc/resources/resource_update.h"
@@ -23,23 +23,20 @@ BitmapContentLayerUpdater::Resource::~Resource() {}
void BitmapContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
- bool partial_update) {
+ bool partial_update,
+ RenderingStats* stats) {
updater_->UpdateTexture(
queue, texture(), source_rect, dest_offset, partial_update);
}
scoped_refptr<BitmapContentLayerUpdater> BitmapContentLayerUpdater::Create(
- scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation) {
- return make_scoped_refptr(
- new BitmapContentLayerUpdater(painter.Pass(), stats_instrumentation));
+ scoped_ptr<LayerPainter> painter) {
+ return make_scoped_refptr(new BitmapContentLayerUpdater(painter.Pass()));
}
BitmapContentLayerUpdater::BitmapContentLayerUpdater(
- scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation)
- : ContentLayerUpdater(painter.Pass(), stats_instrumentation),
- opaque_(false) {}
+ scoped_ptr<LayerPainter> painter)
+ : ContentLayerUpdater(painter.Pass()), opaque_(false) {}
BitmapContentLayerUpdater::~BitmapContentLayerUpdater() {}
@@ -54,24 +51,25 @@ void BitmapContentLayerUpdater::PrepareToUpdate(
gfx::Size tile_size,
float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resulting_opaque_rect) {
+ gfx::Rect* resulting_opaque_rect,
+ RenderingStats* stats) {
if (canvas_size_ != content_rect.size()) {
canvas_size_ = content_rect.size();
canvas_ = make_scoped_ptr(skia::CreateBitmapCanvas(
canvas_size_.width(), canvas_size_.height(), opaque_));
}
- // TODO: Clarify if this needs to be saved here. crbug.com/223693
- rendering_stats_instrumentation_->AddRaster(
- base::TimeDelta(),
- content_rect.width() * content_rect.height(),
- false);
+ if (stats) {
+ stats->total_pixels_rasterized +=
+ content_rect.width() * content_rect.height();
+ }
PaintContents(canvas_.get(),
content_rect,
contents_width_scale,
contents_height_scale,
- resulting_opaque_rect);
+ resulting_opaque_rect,
+ stats);
}
void BitmapContentLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue,