Index: cc/quads/shared_quad_state.cc |
diff --git a/cc/quads/shared_quad_state.cc b/cc/quads/shared_quad_state.cc |
index 83df3657def0a1820c1b09d23d93a73130b63721..57959e3cdd92919615e68d9d7c95c205453fe770 100644 |
--- a/cc/quads/shared_quad_state.cc |
+++ b/cc/quads/shared_quad_state.cc |
@@ -4,7 +4,6 @@ |
#include "cc/quads/shared_quad_state.h" |
-#include "base/debug/trace_event_argument.h" |
#include "base/values.h" |
#include "cc/base/math_util.h" |
#include "cc/debug/traced_value.h" |
@@ -46,32 +45,22 @@ |
this->sorting_context_id = sorting_context_id; |
} |
-void SharedQuadState::AsValueInto(base::debug::TracedValue* value) const { |
- value->BeginArray("transform"); |
- MathUtil::AddToTracedValue(content_to_target_transform, value); |
- value->EndArray(); |
- |
- value->BeginDictionary("layer_content_bounds"); |
- MathUtil::AddToTracedValue(content_bounds, value); |
- value->EndDictionary(); |
- |
- value->BeginArray("layer_visible_content_rect"); |
- MathUtil::AddToTracedValue(visible_content_rect, value); |
- value->EndArray(); |
- |
+scoped_ptr<base::Value> SharedQuadState::AsValue() const { |
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
+ value->Set("transform", |
+ MathUtil::AsValue(content_to_target_transform).release()); |
+ value->Set("layer_content_bounds", |
+ MathUtil::AsValue(content_bounds).release()); |
+ value->Set("layer_visible_content_rect", |
+ MathUtil::AsValue(visible_content_rect).release()); |
value->SetBoolean("is_clipped", is_clipped); |
- |
- value->BeginArray("clip_rect"); |
- MathUtil::AddToTracedValue(clip_rect, value); |
- value->EndArray(); |
- |
+ value->Set("clip_rect", MathUtil::AsValue(clip_rect).release()); |
value->SetDouble("opacity", opacity); |
value->SetString("blend_mode", SkXfermode::ModeName(blend_mode)); |
TracedValue::MakeDictIntoImplicitSnapshotWithCategory( |
TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), |
- value, |
- "cc::SharedQuadState", |
- this); |
+ value.get(), "cc::SharedQuadState", this); |
+ return value.PassAs<base::Value>(); |
} |
} // namespace cc |