OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/client/support/compositor/blimp_layer_tree_settings.h" | 5 #include "blimp/client/support/compositor/blimp_layer_tree_settings.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // On other devices we have increased memory excessively to avoid | 80 // On other devices we have increased memory excessively to avoid |
81 // raster-on-demand already, so now we reserve 50% _only_ to avoid | 81 // raster-on-demand already, so now we reserve 50% _only_ to avoid |
82 // raster-on-demand, and use 50% of the memory otherwise. | 82 // raster-on-demand, and use 50% of the memory otherwise. |
83 settings->max_memory_for_prepaint_percentage = 50; | 83 settings->max_memory_for_prepaint_percentage = 50; |
84 } | 84 } |
85 settings->renderer_settings.should_clear_root_render_pass = true; | 85 settings->renderer_settings.should_clear_root_render_pass = true; |
86 | 86 |
87 // TODO(danakj): Only do this on low end devices. | 87 // TODO(danakj): Only do this on low end devices. |
88 settings->create_low_res_tiling = true; | 88 settings->create_low_res_tiling = true; |
89 | 89 |
90 // TODO(dtrainor): Investigate whether or not we want to use an external | |
91 // source here. | |
92 // settings->use_external_begin_frame_source = true; | |
93 | |
94 #elif !defined(OS_MACOSX) | 90 #elif !defined(OS_MACOSX) |
95 settings->scrollbar_animator = cc::LayerTreeSettings::LINEAR_FADE; | 91 settings->scrollbar_animator = cc::LayerTreeSettings::LINEAR_FADE; |
96 settings->solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | 92 settings->solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); |
97 settings->scrollbar_fade_delay_ms = 500; | 93 settings->scrollbar_fade_delay_ms = 500; |
98 settings->scrollbar_fade_resize_delay_ms = 500; | 94 settings->scrollbar_fade_resize_delay_ms = 500; |
99 settings->scrollbar_fade_duration_ms = 300; | 95 settings->scrollbar_fade_duration_ms = 300; |
100 | 96 |
101 // When pinching in, only show the pinch-viewport overlay scrollbars if the | 97 // When pinching in, only show the pinch-viewport overlay scrollbars if the |
102 // page scale is at least some threshold away from the minimum. i.e. don't | 98 // page scale is at least some threshold away from the minimum. i.e. don't |
103 // show the pinch scrollbars when at minimum scale. | 99 // show the pinch scrollbars when at minimum scale. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 #endif | 212 #endif |
217 settings->default_tile_size.SetSize(default_tile_size, default_tile_size); | 213 settings->default_tile_size.SetSize(default_tile_size, default_tile_size); |
218 | 214 |
219 settings->renderer_settings.buffer_to_texture_target_map = | 215 settings->renderer_settings.buffer_to_texture_target_map = |
220 BlimpGpuMemoryBufferManager::GetDefaultBufferToTextureTargetMap(); | 216 BlimpGpuMemoryBufferManager::GetDefaultBufferToTextureTargetMap(); |
221 settings->use_output_surface_begin_frame_source = true; | 217 settings->use_output_surface_begin_frame_source = true; |
222 } | 218 } |
223 | 219 |
224 } // namespace client | 220 } // namespace client |
225 } // namespace blimp | 221 } // namespace blimp |
OLD | NEW |