Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: cc/resources/picture.cc

Issue 15774010: Add TRACE_EVENT_IS_NEW_TRACE as a way to snapshot objects at start of recording (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 47c08185b6b9aa0dd10301791398e2f7cdc30cf1..71c72ead34e89ce2c7f003144e5658a16acd9305 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -225,11 +225,7 @@ void Picture::CloneForDrawing(int num_threads) {
pixel_refs_));
clones_.push_back(clone);
- TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
- TRACE_DISABLED_BY_DEFAULT("cc.debug"),
- "cc::Picture",
- clone.get(),
- TracedPicture::AsTraceablePicture(clone.get()));
+ clone->EmitTraceSnapshot();
}
}
@@ -276,8 +272,7 @@ void Picture::Record(ContentLayerClient* painter,
opaque_rect_ = gfx::ToEnclosedRect(opaque_layer_rect);
- TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
- "cc::Picture", this, TracedPicture::AsTraceablePicture(this));
+ EmitTraceSnapshot();
}
void Picture::GatherPixelRefs(
@@ -391,6 +386,11 @@ scoped_ptr<Value> Picture::AsValue() const {
return res.PassAs<base::Value>();
}
+void Picture::EmitTraceSnapshot() {
+ TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
+ "cc::Picture", this, TracedPicture::AsTraceablePicture(this));
+}
+
base::LazyInstance<Picture::PixelRefs>
Picture::PixelRefIterator::empty_pixel_refs_;
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698