OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_settings.h" | 5 #include "cc/trees/layer_tree_settings.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 gpu_rasterization_forced(false), | 30 gpu_rasterization_forced(false), |
31 gpu_rasterization_msaa_sample_count(0), | 31 gpu_rasterization_msaa_sample_count(0), |
32 gpu_rasterization_skewport_target_time_in_seconds(0.2f), | 32 gpu_rasterization_skewport_target_time_in_seconds(0.2f), |
33 create_low_res_tiling(false), | 33 create_low_res_tiling(false), |
34 scrollbar_animator(NO_ANIMATOR), | 34 scrollbar_animator(NO_ANIMATOR), |
35 scrollbar_fade_delay_ms(0), | 35 scrollbar_fade_delay_ms(0), |
36 scrollbar_fade_resize_delay_ms(0), | 36 scrollbar_fade_resize_delay_ms(0), |
37 scrollbar_fade_duration_ms(0), | 37 scrollbar_fade_duration_ms(0), |
38 scrollbar_show_scale_threshold(1.0f), | 38 scrollbar_show_scale_threshold(1.0f), |
39 solid_color_scrollbar_color(SK_ColorWHITE), | 39 solid_color_scrollbar_color(SK_ColorWHITE), |
40 timeout_and_draw_when_animation_checkerboards(true), | |
41 maximum_number_of_failed_draws_before_draw_is_forced_(3), | |
42 layer_transforms_should_scale_layer_contents(false), | 40 layer_transforms_should_scale_layer_contents(false), |
43 layers_always_allowed_lcd_text(false), | 41 layers_always_allowed_lcd_text(false), |
44 minimum_contents_scale(0.0625f), | 42 minimum_contents_scale(0.0625f), |
45 low_res_contents_scale_factor(0.25f), | 43 low_res_contents_scale_factor(0.25f), |
46 top_controls_show_threshold(0.5f), | 44 top_controls_show_threshold(0.5f), |
47 top_controls_hide_threshold(0.5f), | 45 top_controls_hide_threshold(0.5f), |
48 background_animation_rate(1.0), | 46 background_animation_rate(1.0), |
49 max_partial_texture_updates(std::numeric_limits<size_t>::max()), | 47 max_partial_texture_updates(std::numeric_limits<size_t>::max()), |
50 default_tile_size(gfx::Size(256, 256)), | 48 default_tile_size(gfx::Size(256, 256)), |
51 max_untiled_layer_size(gfx::Size(512, 512)), | 49 max_untiled_layer_size(gfx::Size(512, 512)), |
(...skipping 23 matching lines...) Expand all Loading... |
75 | 73 |
76 LayerTreeSettings::~LayerTreeSettings() {} | 74 LayerTreeSettings::~LayerTreeSettings() {} |
77 | 75 |
78 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const { | 76 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const { |
79 SchedulerSettings scheduler_settings; | 77 SchedulerSettings scheduler_settings; |
80 scheduler_settings.use_external_begin_frame_source = | 78 scheduler_settings.use_external_begin_frame_source = |
81 use_external_begin_frame_source; | 79 use_external_begin_frame_source; |
82 scheduler_settings.main_frame_before_activation_enabled = | 80 scheduler_settings.main_frame_before_activation_enabled = |
83 main_frame_before_activation_enabled; | 81 main_frame_before_activation_enabled; |
84 scheduler_settings.impl_side_painting = impl_side_painting; | 82 scheduler_settings.impl_side_painting = impl_side_painting; |
85 scheduler_settings.timeout_and_draw_when_animation_checkerboards = | |
86 timeout_and_draw_when_animation_checkerboards; | |
87 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ = | |
88 maximum_number_of_failed_draws_before_draw_is_forced_; | |
89 scheduler_settings.using_synchronous_renderer_compositor = | 83 scheduler_settings.using_synchronous_renderer_compositor = |
90 using_synchronous_renderer_compositor; | 84 using_synchronous_renderer_compositor; |
91 scheduler_settings.throttle_frame_production = throttle_frame_production; | 85 scheduler_settings.throttle_frame_production = throttle_frame_production; |
92 scheduler_settings.main_thread_should_always_be_low_latency = false; | 86 scheduler_settings.main_thread_should_always_be_low_latency = false; |
93 scheduler_settings.background_frame_interval = | 87 scheduler_settings.background_frame_interval = |
94 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate); | 88 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate); |
95 return scheduler_settings; | 89 return scheduler_settings; |
96 } | 90 } |
97 | 91 |
98 } // namespace cc | 92 } // namespace cc |
OLD | NEW |