diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-27 06:15:21 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-27 06:15:21 +0000 |
commit | d5e16c0ce64a8e86df9a3a576e0b26b3622f014a (patch) | |
tree | 4caa46dad5b493b65a136818b7eaebf1f1b830ea /cc/resources/picture.cc | |
parent | c600f5c6c9d3e9fb4b82dfc41b9ec000c9cb284d (diff) | |
download | chromium_src-d5e16c0ce64a8e86df9a3a576e0b26b3622f014a.zip chromium_src-d5e16c0ce64a8e86df9a3a576e0b26b3622f014a.tar.gz chromium_src-d5e16c0ce64a8e86df9a3a576e0b26b3622f014a.tar.bz2 |
Revert 190817 "cc: Switch RenderingStats collection in Layer::Up..."
> 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/13117002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/picture.cc')
-rw-r--r-- | cc/resources/picture.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc index 9ace4d4..d3ddc53 100644 --- a/cc/resources/picture.cc +++ b/cc/resources/picture.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/debug/trace_event.h" -#include "cc/debug/rendering_stats_instrumentation.h" +#include "cc/debug/rendering_stats.h" #include "cc/layers/content_layer_client.h" #include "cc/resources/picture.h" #include "skia/ext/analysis_canvas.h" @@ -79,7 +79,7 @@ void Picture::CloneForDrawing(int num_threads) { } void Picture::Record(ContentLayerClient* painter, - RenderingStatsInstrumentation* stats_instrumentation, + RenderingStats* stats, const SkTileGridPicture::TileGridInfo& tile_grid_info) { TRACE_EVENT2("cc", "Picture::Record", "width", layer_rect_.width(), "height", layer_rect_.height()); @@ -111,13 +111,15 @@ void Picture::Record(ContentLayerClient* painter, canvas->drawRect(layer_skrect, paint); gfx::RectF opaque_layer_rect; - base::TimeTicks start_time = stats_instrumentation->StartRecording(); - + base::TimeTicks begin_paint_time; + if (stats) + begin_paint_time = base::TimeTicks::Now(); painter->PaintContents(canvas, layer_rect_, &opaque_layer_rect); - - base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); - stats_instrumentation->AddPaint(duration, - layer_rect_.width() * layer_rect_.height()); + if (stats) { + stats->total_paint_time += base::TimeTicks::Now() - begin_paint_time; + stats->total_pixels_painted += + layer_rect_.width() * layer_rect_.height(); + } canvas->restore(); picture_->endRecording(); |