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

Unified Diff: cc/scheduler/scheduler_settings.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/scheduler/scheduler_settings.h ('k') | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_settings.cc
diff --git a/cc/scheduler/scheduler_settings.cc b/cc/scheduler/scheduler_settings.cc
index f1bf60e7865670e4351dc061833af9d74b1f0ef7..ea714e34b0dbae4fd3fc49fc0c874f758e739add 100644
--- a/cc/scheduler/scheduler_settings.cc
+++ b/cc/scheduler/scheduler_settings.cc
@@ -4,6 +4,7 @@
#include "cc/scheduler/scheduler_settings.h"
+#include "base/debug/trace_event_argument.h"
#include "cc/trees/layer_tree_settings.h"
namespace cc {
@@ -36,8 +37,10 @@ SchedulerSettings::SchedulerSettings(const LayerTreeSettings& settings)
SchedulerSettings::~SchedulerSettings() {}
-scoped_ptr<base::Value> SchedulerSettings::AsValue() const {
- scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
+scoped_refptr<base::debug::ConvertableToTraceFormat>
+SchedulerSettings::AsValue() const {
+ scoped_refptr<base::debug::TracedValue> state =
+ new base::debug::TracedValue();
state->SetBoolean("begin_frame_scheduling_enabled",
begin_frame_scheduling_enabled);
state->SetBoolean("main_frame_before_draw_enabled",
@@ -52,7 +55,7 @@ scoped_ptr<base::Value> SchedulerSettings::AsValue() const {
state->SetBoolean("using_synchronous_renderer_compositor",
using_synchronous_renderer_compositor);
state->SetBoolean("throttle_frame_production", throttle_frame_production);
- return state.PassAs<base::Value>();
+ return state;
}
} // namespace cc
« no previous file with comments | « cc/scheduler/scheduler_settings.h ('k') | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698