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 25 matching lines...) Expand all Loading... |
36 gpu_rasterization_forced(false), | 36 gpu_rasterization_forced(false), |
37 gpu_rasterization_msaa_sample_count(0), | 37 gpu_rasterization_msaa_sample_count(0), |
38 gpu_rasterization_skewport_target_time_in_seconds(0.2f), | 38 gpu_rasterization_skewport_target_time_in_seconds(0.2f), |
39 create_low_res_tiling(false), | 39 create_low_res_tiling(false), |
40 scrollbar_animator(NO_ANIMATOR), | 40 scrollbar_animator(NO_ANIMATOR), |
41 scrollbar_fade_delay_ms(0), | 41 scrollbar_fade_delay_ms(0), |
42 scrollbar_fade_resize_delay_ms(0), | 42 scrollbar_fade_resize_delay_ms(0), |
43 scrollbar_fade_duration_ms(0), | 43 scrollbar_fade_duration_ms(0), |
44 scrollbar_show_scale_threshold(1.0f), | 44 scrollbar_show_scale_threshold(1.0f), |
45 solid_color_scrollbar_color(SK_ColorWHITE), | 45 solid_color_scrollbar_color(SK_ColorWHITE), |
46 timeout_and_draw_when_animation_checkerboards(true), | |
47 maximum_number_of_failed_draws_before_draw_is_forced_(3), | |
48 layer_transforms_should_scale_layer_contents(false), | 46 layer_transforms_should_scale_layer_contents(false), |
49 layers_always_allowed_lcd_text(false), | 47 layers_always_allowed_lcd_text(false), |
50 minimum_contents_scale(0.0625f), | 48 minimum_contents_scale(0.0625f), |
51 low_res_contents_scale_factor(0.25f), | 49 low_res_contents_scale_factor(0.25f), |
52 top_controls_show_threshold(0.5f), | 50 top_controls_show_threshold(0.5f), |
53 top_controls_hide_threshold(0.5f), | 51 top_controls_hide_threshold(0.5f), |
54 background_animation_rate(1.0), | 52 background_animation_rate(1.0), |
55 max_partial_texture_updates(std::numeric_limits<size_t>::max()), | 53 max_partial_texture_updates(std::numeric_limits<size_t>::max()), |
56 default_tile_size(gfx::Size(256, 256)), | 54 default_tile_size(gfx::Size(256, 256)), |
57 max_untiled_layer_size(gfx::Size(512, 512)), | 55 max_untiled_layer_size(gfx::Size(512, 512)), |
(...skipping 23 matching lines...) Expand all Loading... |
81 | 79 |
82 LayerTreeSettings::~LayerTreeSettings() {} | 80 LayerTreeSettings::~LayerTreeSettings() {} |
83 | 81 |
84 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const { | 82 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const { |
85 SchedulerSettings scheduler_settings; | 83 SchedulerSettings scheduler_settings; |
86 scheduler_settings.use_external_begin_frame_source = | 84 scheduler_settings.use_external_begin_frame_source = |
87 use_external_begin_frame_source; | 85 use_external_begin_frame_source; |
88 scheduler_settings.main_frame_before_activation_enabled = | 86 scheduler_settings.main_frame_before_activation_enabled = |
89 main_frame_before_activation_enabled; | 87 main_frame_before_activation_enabled; |
90 scheduler_settings.impl_side_painting = impl_side_painting; | 88 scheduler_settings.impl_side_painting = impl_side_painting; |
91 scheduler_settings.timeout_and_draw_when_animation_checkerboards = | |
92 timeout_and_draw_when_animation_checkerboards; | |
93 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ = | |
94 maximum_number_of_failed_draws_before_draw_is_forced_; | |
95 scheduler_settings.using_synchronous_renderer_compositor = | 89 scheduler_settings.using_synchronous_renderer_compositor = |
96 using_synchronous_renderer_compositor; | 90 using_synchronous_renderer_compositor; |
97 scheduler_settings.throttle_frame_production = throttle_frame_production; | 91 scheduler_settings.throttle_frame_production = throttle_frame_production; |
98 scheduler_settings.main_thread_should_always_be_low_latency = false; | 92 scheduler_settings.main_thread_should_always_be_low_latency = false; |
99 scheduler_settings.background_frame_interval = | 93 scheduler_settings.background_frame_interval = |
100 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate); | 94 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate); |
101 return scheduler_settings; | 95 return scheduler_settings; |
102 } | 96 } |
103 | 97 |
104 } // namespace cc | 98 } // namespace cc |
OLD | NEW |