OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/scheduler/scheduler_settings.h" | 5 #include "cc/scheduler/scheduler_settings.h" |
6 | 6 |
| 7 #include "base/debug/trace_event_argument.h" |
7 #include "cc/trees/layer_tree_settings.h" | 8 #include "cc/trees/layer_tree_settings.h" |
8 | 9 |
9 namespace cc { | 10 namespace cc { |
10 | 11 |
11 SchedulerSettings::SchedulerSettings() | 12 SchedulerSettings::SchedulerSettings() |
12 : begin_frame_scheduling_enabled(true), | 13 : begin_frame_scheduling_enabled(true), |
13 main_frame_before_draw_enabled(true), | 14 main_frame_before_draw_enabled(true), |
14 main_frame_before_activation_enabled(false), | 15 main_frame_before_activation_enabled(false), |
15 impl_side_painting(false), | 16 impl_side_painting(false), |
16 timeout_and_draw_when_animation_checkerboards(true), | 17 timeout_and_draw_when_animation_checkerboards(true), |
(...skipping 12 matching lines...) Expand all Loading... |
29 settings.timeout_and_draw_when_animation_checkerboards), | 30 settings.timeout_and_draw_when_animation_checkerboards), |
30 maximum_number_of_failed_draws_before_draw_is_forced_( | 31 maximum_number_of_failed_draws_before_draw_is_forced_( |
31 settings.maximum_number_of_failed_draws_before_draw_is_forced_), | 32 settings.maximum_number_of_failed_draws_before_draw_is_forced_), |
32 using_synchronous_renderer_compositor( | 33 using_synchronous_renderer_compositor( |
33 settings.using_synchronous_renderer_compositor), | 34 settings.using_synchronous_renderer_compositor), |
34 throttle_frame_production(settings.throttle_frame_production) { | 35 throttle_frame_production(settings.throttle_frame_production) { |
35 } | 36 } |
36 | 37 |
37 SchedulerSettings::~SchedulerSettings() {} | 38 SchedulerSettings::~SchedulerSettings() {} |
38 | 39 |
39 scoped_ptr<base::Value> SchedulerSettings::AsValue() const { | 40 scoped_refptr<base::debug::ConvertableToTraceFormat> |
40 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue); | 41 SchedulerSettings::AsValue() const { |
| 42 scoped_refptr<base::debug::TracedValue> state = |
| 43 new base::debug::TracedValue(); |
41 state->SetBoolean("begin_frame_scheduling_enabled", | 44 state->SetBoolean("begin_frame_scheduling_enabled", |
42 begin_frame_scheduling_enabled); | 45 begin_frame_scheduling_enabled); |
43 state->SetBoolean("main_frame_before_draw_enabled", | 46 state->SetBoolean("main_frame_before_draw_enabled", |
44 main_frame_before_draw_enabled); | 47 main_frame_before_draw_enabled); |
45 state->SetBoolean("main_frame_before_activation_enabled", | 48 state->SetBoolean("main_frame_before_activation_enabled", |
46 main_frame_before_activation_enabled); | 49 main_frame_before_activation_enabled); |
47 state->SetBoolean("impl_side_painting", impl_side_painting); | 50 state->SetBoolean("impl_side_painting", impl_side_painting); |
48 state->SetBoolean("timeout_and_draw_when_animation_checkerboards", | 51 state->SetBoolean("timeout_and_draw_when_animation_checkerboards", |
49 timeout_and_draw_when_animation_checkerboards); | 52 timeout_and_draw_when_animation_checkerboards); |
50 state->SetInteger("maximum_number_of_failed_draws_before_draw_is_forced_", | 53 state->SetInteger("maximum_number_of_failed_draws_before_draw_is_forced_", |
51 maximum_number_of_failed_draws_before_draw_is_forced_); | 54 maximum_number_of_failed_draws_before_draw_is_forced_); |
52 state->SetBoolean("using_synchronous_renderer_compositor", | 55 state->SetBoolean("using_synchronous_renderer_compositor", |
53 using_synchronous_renderer_compositor); | 56 using_synchronous_renderer_compositor); |
54 state->SetBoolean("throttle_frame_production", throttle_frame_production); | 57 state->SetBoolean("throttle_frame_production", throttle_frame_production); |
55 return state.PassAs<base::Value>(); | 58 return state; |
56 } | 59 } |
57 | 60 |
58 } // namespace cc | 61 } // namespace cc |
OLD | NEW |