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

Unified Diff: cc/resources/picture_pile_base.cc

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 5 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_pile_base.h ('k') | cc/resources/pixel_buffer_raster_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile_base.cc
diff --git a/cc/resources/picture_pile_base.cc b/cc/resources/picture_pile_base.cc
index 55209dbf86ff1d2220b56f01fd35690ba9944943..146c886d4780de0efc143c79a1eda79f7438d4cc 100644
--- a/cc/resources/picture_pile_base.cc
+++ b/cc/resources/picture_pile_base.cc
@@ -8,6 +8,7 @@
#include <set>
#include <vector>
+#include "base/debug/trace_event_argument.h"
#include "base/logging.h"
#include "base/values.h"
#include "cc/base/math_util.h"
@@ -198,8 +199,7 @@ gfx::Rect PicturePileBase::PadRect(const gfx::Rect& rect) {
return padded_rect;
}
-scoped_ptr<base::Value> PicturePileBase::AsValue() const {
- scoped_ptr<base::ListValue> pictures(new base::ListValue());
+void PicturePileBase::AsValueInto(base::debug::TracedValue* pictures) const {
gfx::Rect tiling_rect(tiling_.tiling_size());
std::set<void*> appended_pictures;
bool include_borders = true;
@@ -213,10 +213,9 @@ scoped_ptr<base::Value> PicturePileBase::AsValue() const {
Picture* picture = map_iter->second.GetPicture();
if (picture && (appended_pictures.count(picture) == 0)) {
appended_pictures.insert(picture);
- pictures->Append(TracedValue::CreateIDRef(picture).release());
+ TracedValue::AppendIDRef(picture, pictures);
}
}
- return pictures.PassAs<base::Value>();
}
PicturePileBase::PictureInfo::PictureInfo() : last_frame_number_(0) {}
« no previous file with comments | « cc/resources/picture_pile_base.h ('k') | cc/resources/pixel_buffer_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698