summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorcaseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 12:46:35 +0000
committercaseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 12:46:35 +0000
commit4c38fdc54a9d15156b3196be3dfe15fe15edc685 (patch)
treed5a67bf3c18a8843c7b4b8d5208542f9d27b342a /cc
parentf6c58823df3449679e4f266ba0c612f11e9594cb (diff)
downloadchromium_src-4c38fdc54a9d15156b3196be3dfe15fe15edc685.zip
chromium_src-4c38fdc54a9d15156b3196be3dfe15fe15edc685.tar.gz
chromium_src-4c38fdc54a9d15156b3196be3dfe15fe15edc685.tar.bz2
Add devtools instrumentation for canvas creation in BitmapContentLayerUpdater
Canvas bitmap allocation may take considerable time (close to that of actual layer update), so having it intrumented helps to reduce "unknown" time on Timeline. - keep layer id in content layer updater, plumb it through all content layer updaters. - extract boilerplate of devtools instrumentation classes to a macro; - add instrumentation around canvas bitmap allocation in BitmapContentLayerUpdater. Related blink change: https://codereview.chromium.org/15466005 R=nduca@chromium.org Review URL: https://codereview.chromium.org/15317008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/debug/devtools_instrumentation.h45
-rw-r--r--cc/layers/content_layer.cc9
-rw-r--r--cc/layers/content_layer_unittest.cc3
-rw-r--r--cc/layers/picture_layer.cc3
-rw-r--r--cc/layers/scrollbar_layer.cc10
-rw-r--r--cc/layers/tiled_layer_unittest.cc3
-rw-r--r--cc/resources/bitmap_content_layer_updater.cc17
-rw-r--r--cc/resources/bitmap_content_layer_updater.h6
-rw-r--r--cc/resources/bitmap_skpicture_content_layer_updater.cc13
-rw-r--r--cc/resources/bitmap_skpicture_content_layer_updater.h6
-rw-r--r--cc/resources/caching_bitmap_content_layer_updater.cc13
-rw-r--r--cc/resources/caching_bitmap_content_layer_updater.h6
-rw-r--r--cc/resources/content_layer_updater.cc4
-rw-r--r--cc/resources/content_layer_updater.h4
-rw-r--r--cc/resources/skpicture_content_layer_updater.cc12
-rw-r--r--cc/resources/skpicture_content_layer_updater.h6
-rw-r--r--cc/resources/tile_manager.cc6
17 files changed, 96 insertions, 70 deletions
diff --git a/cc/debug/devtools_instrumentation.h b/cc/debug/devtools_instrumentation.h
index eb5a619..7b2ea1a 100644
--- a/cc/debug/devtools_instrumentation.h
+++ b/cc/debug/devtools_instrumentation.h
@@ -13,45 +13,25 @@ namespace devtools_instrumentation {
namespace internal {
const char kCategory[] = "cc,devtools";
const char kLayerId[] = "layerId";
+}
+
const char kPaintLayer[] = "PaintLayer";
const char kRasterTask[] = "RasterTask";
const char kImageDecodeTask[] = "ImageDecodeTask";
-}
+const char kPaintSetup[] = "PaintSetup";
-struct ScopedPaintLayer {
- explicit ScopedPaintLayer(int layer_id) {
- TRACE_EVENT_BEGIN1(internal::kCategory, internal::kPaintLayer,
+class ScopedLayerTask {
+ public:
+ explicit ScopedLayerTask(const char* event_name, int layer_id)
+ : event_name_(event_name) {
+ TRACE_EVENT_BEGIN1(internal::kCategory, event_name_,
internal::kLayerId, layer_id);
}
- ~ScopedPaintLayer() {
- TRACE_EVENT_END0(internal::kCategory, internal::kPaintLayer);
+ ~ScopedLayerTask() {
+ TRACE_EVENT_END0(internal::kCategory, event_name_);
}
-
- DISALLOW_COPY_AND_ASSIGN(ScopedPaintLayer);
-};
-
-struct ScopedRasterTask {
- explicit ScopedRasterTask(int layer_id) {
- TRACE_EVENT_BEGIN1(internal::kCategory, internal::kRasterTask,
- internal::kLayerId, layer_id);
- }
- ~ScopedRasterTask() {
- TRACE_EVENT_END0(internal::kCategory, internal::kRasterTask);
- }
-
- DISALLOW_COPY_AND_ASSIGN(ScopedRasterTask);
-};
-
-struct ScopedImageDecodeTask {
- explicit ScopedImageDecodeTask(int layer_id) {
- TRACE_EVENT_BEGIN1(internal::kCategory, internal::kImageDecodeTask,
- internal::kLayerId, layer_id);
- }
- ~ScopedImageDecodeTask() {
- TRACE_EVENT_END0(internal::kCategory, internal::kImageDecodeTask);
- }
-
- DISALLOW_COPY_AND_ASSIGN(ScopedImageDecodeTask);
+ private:
+ const char* event_name_;
};
struct ScopedLayerObjectTracker
@@ -70,4 +50,3 @@ struct ScopedLayerObjectTracker
} // namespace cc
#endif // CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
-
diff --git a/cc/layers/content_layer.cc b/cc/layers/content_layer.cc
index a6aa5ba..44af47e 100644
--- a/cc/layers/content_layer.cc
+++ b/cc/layers/content_layer.cc
@@ -98,15 +98,18 @@ void ContentLayer::CreateUpdaterIfNeeded() {
if (layer_tree_host()->settings().accelerate_painting)
updater_ = SkPictureContentLayerUpdater::Create(
painter.Pass(),
- rendering_stats_instrumentation());
+ rendering_stats_instrumentation(),
+ id());
else if (layer_tree_host()->settings().per_tile_painting_enabled)
updater_ = BitmapSkPictureContentLayerUpdater::Create(
painter.Pass(),
- rendering_stats_instrumentation());
+ rendering_stats_instrumentation(),
+ id());
else
updater_ = BitmapContentLayerUpdater::Create(
painter.Pass(),
- rendering_stats_instrumentation());
+ rendering_stats_instrumentation(),
+ id());
updater_->SetOpaque(contents_opaque());
unsigned texture_format =
diff --git a/cc/layers/content_layer_unittest.cc b/cc/layers/content_layer_unittest.cc
index 16e42ed..e9faa7d 100644
--- a/cc/layers/content_layer_unittest.cc
+++ b/cc/layers/content_layer_unittest.cc
@@ -42,7 +42,8 @@ TEST(ContentLayerTest, ContentLayerPainterWithDeviceScale) {
scoped_refptr<BitmapContentLayerUpdater> updater =
BitmapContentLayerUpdater::Create(
ContentLayerPainter::Create(&client).PassAs<LayerPainter>(),
- &stats_instrumentation);
+ &stats_instrumentation,
+ 0);
gfx::Rect resulting_opaque_rect;
updater->PrepareToUpdate(content_rect,
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index dfb645f..4f4b385 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -89,7 +89,8 @@ void PictureLayer::Update(ResourceUpdateQueue*,
gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect(
visible_content_rect(), 1.f / contents_scale_x());
- devtools_instrumentation::ScopedPaintLayer paint_layer(id());
+ devtools_instrumentation::ScopedLayerTask paint_layer(
+ devtools_instrumentation::kPaintLayer, id());
pile_->Update(client_,
background_color(),
pile_invalidation_,
diff --git a/cc/layers/scrollbar_layer.cc b/cc/layers/scrollbar_layer.cc
index d7c19ff..ed25d2e 100644
--- a/cc/layers/scrollbar_layer.cc
+++ b/cc/layers/scrollbar_layer.cc
@@ -1,3 +1,4 @@
+
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -271,7 +272,8 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
painter_.get(),
geometry_.get(),
WebKit::WebScrollbar::BackTrackPart).PassAs<LayerPainter>(),
- rendering_stats_instrumentation());
+ rendering_stats_instrumentation(),
+ id());
}
if (!back_track_) {
back_track_ = back_track_updater_->CreateResource(
@@ -288,7 +290,8 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
painter_.get(),
geometry_.get(),
WebKit::WebScrollbar::ForwardTrackPart).PassAs<LayerPainter>(),
- rendering_stats_instrumentation());
+ rendering_stats_instrumentation(),
+ id());
}
if (!fore_track_) {
fore_track_ = fore_track_updater_->CreateResource(
@@ -301,7 +304,8 @@ void ScrollbarLayer::CreateUpdaterIfNeeded() {
ScrollbarThumbPainter::Create(scrollbar_.get(),
painter_.get(),
geometry_.get()).PassAs<LayerPainter>(),
- rendering_stats_instrumentation());
+ rendering_stats_instrumentation(),
+ id());
}
if (!thumb_) {
thumb_ = thumb_updater_->CreateResource(
diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc
index fb682d4..8274c8b 100644
--- a/cc/layers/tiled_layer_unittest.cc
+++ b/cc/layers/tiled_layer_unittest.cc
@@ -1765,7 +1765,8 @@ class UpdateTrackingTiledLayer : public FakeTiledLayer {
tracking_layer_painter_ = painter.get();
layer_updater_ =
BitmapContentLayerUpdater::Create(painter.PassAs<LayerPainter>(),
- &stats_instrumentation_);
+ &stats_instrumentation_,
+ 0);
}
TrackingLayerPainter* tracking_layer_painter() const {
diff --git a/cc/resources/bitmap_content_layer_updater.cc b/cc/resources/bitmap_content_layer_updater.cc
index a5684a0..77ff754 100644
--- a/cc/resources/bitmap_content_layer_updater.cc
+++ b/cc/resources/bitmap_content_layer_updater.cc
@@ -4,6 +4,7 @@
#include "cc/resources/bitmap_content_layer_updater.h"
+#include "cc/debug/devtools_instrumentation.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/resources/layer_painter.h"
#include "cc/resources/prioritized_resource.h"
@@ -31,15 +32,19 @@ void BitmapContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
scoped_refptr<BitmapContentLayerUpdater> BitmapContentLayerUpdater::Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation) {
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id) {
return make_scoped_refptr(
- new BitmapContentLayerUpdater(painter.Pass(), stats_instrumentation));
+ new BitmapContentLayerUpdater(painter.Pass(),
+ stats_instrumentation,
+ layer_id));
}
BitmapContentLayerUpdater::BitmapContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation)
- : ContentLayerUpdater(painter.Pass(), stats_instrumentation),
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id)
+ : ContentLayerUpdater(painter.Pass(), stats_instrumentation, layer_id),
opaque_(false) {}
BitmapContentLayerUpdater::~BitmapContentLayerUpdater() {}
@@ -57,7 +62,11 @@ void BitmapContentLayerUpdater::PrepareToUpdate(
float contents_height_scale,
gfx::Rect* resulting_opaque_rect,
RenderingStats* stats) {
+ devtools_instrumentation::ScopedLayerTask paint_layer(
+ devtools_instrumentation::kPaintLayer, layer_id_);
if (canvas_size_ != content_rect.size()) {
+ devtools_instrumentation::ScopedLayerTask paint_setup(
+ devtools_instrumentation::kPaintSetup, layer_id_);
canvas_size_ = content_rect.size();
canvas_ = skia::AdoptRef(skia::CreateBitmapCanvas(
canvas_size_.width(), canvas_size_.height(), opaque_));
diff --git a/cc/resources/bitmap_content_layer_updater.h b/cc/resources/bitmap_content_layer_updater.h
index ad739b4..db270f0 100644
--- a/cc/resources/bitmap_content_layer_updater.h
+++ b/cc/resources/bitmap_content_layer_updater.h
@@ -41,7 +41,8 @@ class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater {
static scoped_refptr<BitmapContentLayerUpdater> Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumenation);
+ RenderingStatsInstrumentation* stats_instrumenation,
+ int layer_id);
virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* manager) OVERRIDE;
@@ -62,7 +63,8 @@ class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater {
protected:
BitmapContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumenation);
+ RenderingStatsInstrumentation* stats_instrumenation,
+ int layer_id);
virtual ~BitmapContentLayerUpdater();
skia::RefPtr<SkCanvas> canvas_;
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.cc b/cc/resources/bitmap_skpicture_content_layer_updater.cc
index 48e67db..12a2828 100644
--- a/cc/resources/bitmap_skpicture_content_layer_updater.cc
+++ b/cc/resources/bitmap_skpicture_content_layer_updater.cc
@@ -44,16 +44,21 @@ void BitmapSkPictureContentLayerUpdater::Resource::Update(
scoped_refptr<BitmapSkPictureContentLayerUpdater>
BitmapSkPictureContentLayerUpdater::Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation) {
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id) {
return make_scoped_refptr(
new BitmapSkPictureContentLayerUpdater(painter.Pass(),
- stats_instrumentation));
+ stats_instrumentation,
+ layer_id));
}
BitmapSkPictureContentLayerUpdater::BitmapSkPictureContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation)
- : SkPictureContentLayerUpdater(painter.Pass(), stats_instrumentation) {}
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id)
+ : SkPictureContentLayerUpdater(painter.Pass(),
+ stats_instrumentation,
+ layer_id) {}
BitmapSkPictureContentLayerUpdater::~BitmapSkPictureContentLayerUpdater() {}
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.h b/cc/resources/bitmap_skpicture_content_layer_updater.h
index 144047b..c4a73c4 100644
--- a/cc/resources/bitmap_skpicture_content_layer_updater.h
+++ b/cc/resources/bitmap_skpicture_content_layer_updater.h
@@ -35,7 +35,8 @@ class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
static scoped_refptr<BitmapSkPictureContentLayerUpdater> Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* manager) OVERRIDE;
@@ -46,7 +47,8 @@ class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
private:
BitmapSkPictureContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual ~BitmapSkPictureContentLayerUpdater();
DISALLOW_COPY_AND_ASSIGN(BitmapSkPictureContentLayerUpdater);
diff --git a/cc/resources/caching_bitmap_content_layer_updater.cc b/cc/resources/caching_bitmap_content_layer_updater.cc
index 42e462b..2efd31d 100644
--- a/cc/resources/caching_bitmap_content_layer_updater.cc
+++ b/cc/resources/caching_bitmap_content_layer_updater.cc
@@ -13,16 +13,21 @@ namespace cc {
scoped_refptr<CachingBitmapContentLayerUpdater>
CachingBitmapContentLayerUpdater::Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation) {
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id) {
return make_scoped_refptr(
new CachingBitmapContentLayerUpdater(painter.Pass(),
- stats_instrumentation));
+ stats_instrumentation,
+ layer_id));
}
CachingBitmapContentLayerUpdater::CachingBitmapContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation)
- : BitmapContentLayerUpdater(painter.Pass(), stats_instrumentation),
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id)
+ : BitmapContentLayerUpdater(painter.Pass(),
+ stats_instrumentation,
+ layer_id),
pixels_did_change_(false) {}
CachingBitmapContentLayerUpdater::~CachingBitmapContentLayerUpdater() {}
diff --git a/cc/resources/caching_bitmap_content_layer_updater.h b/cc/resources/caching_bitmap_content_layer_updater.h
index 657ea56..33726c8 100644
--- a/cc/resources/caching_bitmap_content_layer_updater.h
+++ b/cc/resources/caching_bitmap_content_layer_updater.h
@@ -15,7 +15,8 @@ class CachingBitmapContentLayerUpdater : public BitmapContentLayerUpdater {
public:
static scoped_refptr<CachingBitmapContentLayerUpdater> Create(
scoped_ptr<LayerPainter>,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual void PrepareToUpdate(gfx::Rect content_rect,
gfx::Size tile_size,
@@ -31,7 +32,8 @@ class CachingBitmapContentLayerUpdater : public BitmapContentLayerUpdater {
private:
CachingBitmapContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual ~CachingBitmapContentLayerUpdater();
bool pixels_did_change_;
diff --git a/cc/resources/content_layer_updater.cc b/cc/resources/content_layer_updater.cc
index 4e967e2..e975cd4 100644
--- a/cc/resources/content_layer_updater.cc
+++ b/cc/resources/content_layer_updater.cc
@@ -19,8 +19,10 @@ namespace cc {
ContentLayerUpdater::ContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation)
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id)
: rendering_stats_instrumentation_(stats_instrumentation),
+ layer_id_(layer_id),
painter_(painter.Pass()) {}
ContentLayerUpdater::~ContentLayerUpdater() {}
diff --git a/cc/resources/content_layer_updater.h b/cc/resources/content_layer_updater.h
index 9176f2c..0b7e163 100644
--- a/cc/resources/content_layer_updater.h
+++ b/cc/resources/content_layer_updater.h
@@ -22,7 +22,8 @@ class RenderingStatsInstrumentation;
class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
protected:
ContentLayerUpdater(scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual ~ContentLayerUpdater();
void PaintContents(SkCanvas* canvas,
@@ -34,6 +35,7 @@ class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
gfx::Rect content_rect() const { return content_rect_; }
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
+ int layer_id_;
private:
gfx::Rect content_rect_;
diff --git a/cc/resources/skpicture_content_layer_updater.cc b/cc/resources/skpicture_content_layer_updater.cc
index 5010aa9..bfa6d56 100644
--- a/cc/resources/skpicture_content_layer_updater.cc
+++ b/cc/resources/skpicture_content_layer_updater.cc
@@ -31,8 +31,9 @@ void SkPictureContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
SkPictureContentLayerUpdater::SkPictureContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation)
- : ContentLayerUpdater(painter.Pass(), stats_instrumentation),
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id)
+ : ContentLayerUpdater(painter.Pass(), stats_instrumentation, layer_id),
layer_is_opaque_(false) {}
SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {}
@@ -40,9 +41,12 @@ SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {}
scoped_refptr<SkPictureContentLayerUpdater>
SkPictureContentLayerUpdater::Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation) {
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id) {
return make_scoped_refptr(
- new SkPictureContentLayerUpdater(painter.Pass(), stats_instrumentation));
+ new SkPictureContentLayerUpdater(painter.Pass(),
+ stats_instrumentation,
+ layer_id));
}
scoped_ptr<LayerUpdater::Resource> SkPictureContentLayerUpdater::CreateResource(
diff --git a/cc/resources/skpicture_content_layer_updater.h b/cc/resources/skpicture_content_layer_updater.h
index b1ac917..a835744 100644
--- a/cc/resources/skpicture_content_layer_updater.h
+++ b/cc/resources/skpicture_content_layer_updater.h
@@ -41,7 +41,8 @@ class SkPictureContentLayerUpdater : public ContentLayerUpdater {
static scoped_refptr<SkPictureContentLayerUpdater> Create(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* manager) OVERRIDE;
@@ -50,7 +51,8 @@ class SkPictureContentLayerUpdater : public ContentLayerUpdater {
protected:
SkPictureContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation);
+ RenderingStatsInstrumentation* stats_instrumentation,
+ int layer_id);
virtual ~SkPictureContentLayerUpdater();
virtual void PrepareToUpdate(gfx::Rect content_rect,
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 902cf55..5c54b1e 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -936,7 +936,8 @@ void TileManager::RunRasterTask(
TRACE_EVENT1(
"cc", "TileManager::RunRasterTask",
"metadata", TracedValue::FromValue(metadata.AsValue().release()));
- devtools_instrumentation::ScopedRasterTask raster_task(metadata.layer_id);
+ devtools_instrumentation::ScopedLayerTask raster_task(
+ devtools_instrumentation::kRasterTask, metadata.layer_id);
DCHECK(picture_pile);
DCHECK(analysis);
@@ -980,7 +981,8 @@ void TileManager::RunImageDecodeTask(
int layer_id,
RenderingStatsInstrumentation* stats_instrumentation) {
TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask");
- devtools_instrumentation::ScopedImageDecodeTask image_decode_task(layer_id);
+ devtools_instrumentation::ScopedLayerTask image_decode_task(
+ devtools_instrumentation::kImageDecodeTask, layer_id);
base::TimeTicks start_time = stats_instrumentation->StartRecording();
pixel_ref->Decode();
base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);