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

Unified Diff: cc/quads/shared_quad_state.cc

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/quads/shared_quad_state.h ('k') | cc/quads/solid_color_draw_quad.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/quads/shared_quad_state.h ('k') | cc/quads/solid_color_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698