[Media,Android] Moved OnSuspend and OnResume out of #if defined(VIDEO_HOLE)
[chromium-blink-merge.git] / cc / scheduler / scheduler_settings.cc
blobd1d3a6f46c39cbb1f7ea2b68dc8fb77522e72907
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
3 // found in the LICENSE file.
5 #include "cc/scheduler/scheduler_settings.h"
7 #include "base/trace_event/trace_event_argument.h"
9 namespace cc {
11 SchedulerSettings::SchedulerSettings()
12 : use_external_begin_frame_source(false),
13 main_frame_while_swap_throttled_enabled(false),
14 main_frame_before_activation_enabled(false),
15 commit_to_active_tree(false),
16 timeout_and_draw_when_animation_checkerboards(true),
17 using_synchronous_renderer_compositor(false),
18 throttle_frame_production(true),
19 maximum_number_of_failed_draws_before_draw_is_forced(3),
20 background_frame_interval(base::TimeDelta::FromSeconds(1)) {
23 SchedulerSettings::~SchedulerSettings() {}
25 scoped_refptr<base::trace_event::ConvertableToTraceFormat>
26 SchedulerSettings::AsValue() const {
27 scoped_refptr<base::trace_event::TracedValue> state =
28 new base::trace_event::TracedValue();
29 state->SetBoolean("use_external_begin_frame_source",
30 use_external_begin_frame_source);
31 state->SetBoolean("main_frame_while_swap_throttled_enabled",
32 main_frame_while_swap_throttled_enabled);
33 state->SetBoolean("main_frame_before_activation_enabled",
34 main_frame_before_activation_enabled);
35 state->SetBoolean("commit_to_active_tree", commit_to_active_tree);
36 state->SetBoolean("timeout_and_draw_when_animation_checkerboards",
37 timeout_and_draw_when_animation_checkerboards);
38 state->SetInteger("maximum_number_of_failed_draws_before_draw_is_forced",
39 maximum_number_of_failed_draws_before_draw_is_forced);
40 state->SetBoolean("using_synchronous_renderer_compositor",
41 using_synchronous_renderer_compositor);
42 state->SetBoolean("throttle_frame_production", throttle_frame_production);
43 state->SetInteger("background_frame_interval",
44 background_frame_interval.InMicroseconds());
45 return state;
48 } // namespace cc