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) {} |