summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-18 08:59:24 +0000
committerernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-18 08:59:24 +0000
commitc98059a69237df6636483c24b47dbd833893933d (patch)
tree1b652b1e8e451f96fa03fa1be53b3df751be9408 /cc
parentb76fc2a098e5999ff70f3866fb15c0d95e3a5ad6 (diff)
downloadchromium_src-c98059a69237df6636483c24b47dbd833893933d.zip
chromium_src-c98059a69237df6636483c24b47dbd833893933d.tar.gz
chromium_src-c98059a69237df6636483c24b47dbd833893933d.tar.bz2
cc: Trace based rasterize and record benchmark.
- switched rasterize and record benchmark to used traces instead of rendering stats BUG=226489 Review URL: https://chromiumcodereview.appspot.com/15298011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/resources/picture.cc8
-rw-r--r--cc/resources/picture_pile.cc6
-rw-r--r--cc/resources/tile_manager.cc1
-rw-r--r--cc/trees/layer_tree_host.cc3
4 files changed, 13 insertions, 5 deletions
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index a297ceb..1690ebd 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -192,8 +192,6 @@ void Picture::Record(ContentLayerClient* painter,
"width", layer_rect_.width(),
"height", layer_rect_.height());
- // Record() should only be called once.
- DCHECK(!picture_);
DCHECK(!tile_grid_info.fTileInterval.isEmpty());
picture_ = skia::AdoptRef(new SkTileGridPicture(
layer_rect_.width(), layer_rect_.height(), tile_grid_info));
@@ -303,7 +301,7 @@ void Picture::Raster(
gfx::Rect content_rect,
float contents_scale,
bool enable_lcd_text) {
- TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug"), "Picture::Raster",
+ TRACE_EVENT_BEGIN1("cc", "Picture::Raster",
"data", AsTraceableRasterData(content_rect, contents_scale));
DCHECK(picture_);
@@ -318,7 +316,11 @@ void Picture::Raster(
if (!enable_lcd_text)
canvas->setDrawFilter(&disable_lcd_text_filter);
canvas->drawPicture(*picture_);
+ SkIRect bounds;
+ canvas->getClipDeviceBounds(&bounds);
canvas->restore();
+ TRACE_EVENT_END1("cc", "Picture::Raster",
+ "num_pixels_rasterized", bounds.width() * bounds.height());
}
void Picture::AsBase64String(std::string* output) const {
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 9fe76db..3035209 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -82,6 +82,8 @@ void PicturePile::Update(
}
}
+ int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
+
// Walk through all pictures in the rect of interest and record.
for (TilingData::Iterator iter(&tiling_, interest_rect); iter; ++iter) {
// Create a picture in this list if it doesn't exist.
@@ -103,7 +105,9 @@ void PicturePile::Update(
for (PictureList::iterator pic = pic_list.begin();
pic != pic_list.end(); ++pic) {
if (!(*pic)->HasRecording()) {
- (*pic)->Record(painter, tile_grid_info_, stats);
+ TRACE_EVENT0("cc", "PicturePile::Update recording loop");
+ for (int i = 0; i < repeat_count; i++)
+ (*pic)->Record(painter, tile_grid_info_, stats);
(*pic)->GatherPixelRefs(tile_grid_info_, stats);
(*pic)->CloneForDrawing(num_raster_threads_);
}
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 2cb9796..ebd75af 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -858,6 +858,7 @@ scoped_ptr<base::Value> TileManager::RasterTaskMetadata::AsValue() const {
res->SetBoolean("is_tile_in_pending_tree_now_bin",
is_tile_in_pending_tree_now_bin);
res->Set("resolution", TileResolutionAsValue(tile_resolution).release());
+ res->SetInteger("source_frame_number", source_frame_number);
return res.PassAs<base::Value>();
}
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 3e3a52e..55f5bd2 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -676,7 +676,8 @@ static Layer* FindFirstScrollableLayer(Layer* layer) {
void LayerTreeHost::UpdateLayers(Layer* root_layer,
ResourceUpdateQueue* queue) {
- TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers");
+ TRACE_EVENT1("cc", "LayerTreeHost::UpdateLayers",
+ "commit_number", commit_number());
LayerList update_list;
{