summaryrefslogtreecommitdiffstats
path: root/cc/resources/picture.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/resources/picture.cc')
-rw-r--r--cc/resources/picture.cc29
1 files changed, 12 insertions, 17 deletions
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 94ab870..8083050 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -13,7 +13,6 @@
#include "base/values.h"
#include "cc/base/math_util.h"
#include "cc/base/util.h"
-#include "cc/debug/benchmark_instrumentation.h"
#include "cc/debug/traced_picture.h"
#include "cc/debug/traced_value.h"
#include "cc/layers/content_layer_client.h"
@@ -204,9 +203,8 @@ void Picture::CloneForDrawing(int num_threads) {
void Picture::Record(ContentLayerClient* painter,
const SkTileGridPicture::TileGridInfo& tile_grid_info) {
- TRACE_EVENT1(benchmark_instrumentation::kCategory,
- benchmark_instrumentation::kPictureRecord,
- benchmark_instrumentation::kData, AsTraceableRecordData());
+ TRACE_EVENT1("cc", "Picture::Record",
+ "data", AsTraceableRecordData());
DCHECK(!tile_grid_info.fTileInterval.isEmpty());
picture_ = skia::AdoptRef(new SkTileGridPicture(
@@ -293,15 +291,14 @@ void Picture::GatherPixelRefs(
max_pixel_cell_ = gfx::Point(max_x, max_y);
}
-void Picture::Raster(
+int Picture::Raster(
SkCanvas* canvas,
SkDrawPictureCallback* callback,
gfx::Rect content_rect,
float contents_scale) {
- TRACE_EVENT_BEGIN1(benchmark_instrumentation::kCategory,
- benchmark_instrumentation::kPictureRaster,
- "data",
- AsTraceableRasterData(content_rect, contents_scale));
+ TRACE_EVENT_BEGIN1(
+ "cc", "Picture::Raster",
+ "data", AsTraceableRasterData(content_rect, contents_scale));
DCHECK(picture_);
@@ -313,10 +310,10 @@ void Picture::Raster(
SkIRect bounds;
canvas->getClipDeviceBounds(&bounds);
canvas->restore();
- TRACE_EVENT_END1(benchmark_instrumentation::kCategory,
- benchmark_instrumentation::kPictureRaster,
- benchmark_instrumentation::kNumPixelsRasterized,
- bounds.width() * bounds.height());
+ TRACE_EVENT_END1(
+ "cc", "Picture::Raster",
+ "num_pixels_rasterized", bounds.width() * bounds.height());
+ return bounds.width() * bounds.height();
}
void Picture::Replay(SkCanvas* canvas) {
@@ -478,10 +475,8 @@ scoped_refptr<base::debug::ConvertableToTraceFormat>
Picture::AsTraceableRecordData() const {
scoped_ptr<base::DictionaryValue> record_data(new base::DictionaryValue());
record_data->Set("picture_id", TracedValue::CreateIDRef(this).release());
- record_data->SetInteger(benchmark_instrumentation::kWidth,
- layer_rect_.width());
- record_data->SetInteger(benchmark_instrumentation::kHeight,
- layer_rect_.height());
+ record_data->SetInteger("width", layer_rect_.width());
+ record_data->SetInteger("height", layer_rect_.height());
return TracedValue::FromValue(record_data.release());
}