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
3 // found in the LICENSE file.
5 #include "cc/trees/layer_tree_settings.h"
9 #include "base/command_line.h"
10 #include "base/logging.h"
11 #include "base/strings/string_number_conversions.h"
15 LayerTreeSettings::LayerTreeSettings()
16 : impl_side_painting(false),
17 allow_antialiasing(true),
18 throttle_frame_production(true),
19 single_thread_proxy_scheduler(true),
20 begin_frame_scheduling_enabled(false),
21 main_frame_before_draw_enabled(true),
22 main_frame_before_activation_enabled(false),
23 using_synchronous_renderer_compositor(false),
24 report_overscroll_only_for_scrollable_axes(false),
25 per_tile_painting_enabled(false),
26 partial_swap_enabled(false),
27 accelerated_animation_enabled(true),
28 can_use_lcd_text(true),
29 should_clear_root_render_pass(true),
30 gpu_rasterization_enabled(false),
31 gpu_rasterization_forced(false),
32 recording_mode(RecordNormally
),
33 create_low_res_tiling(true),
34 scrollbar_animator(NoAnimator
),
35 scrollbar_fade_delay_ms(0),
36 scrollbar_fade_duration_ms(0),
37 solid_color_scrollbar_color(SK_ColorWHITE
),
38 calculate_top_controls_position(false),
39 timeout_and_draw_when_animation_checkerboards(true),
40 maximum_number_of_failed_draws_before_draw_is_forced_(3),
41 layer_transforms_should_scale_layer_contents(false),
42 minimum_contents_scale(0.0625f
),
43 low_res_contents_scale_factor(0.25f
),
44 top_controls_height(0.f
),
45 top_controls_show_threshold(0.5f
),
46 top_controls_hide_threshold(0.5f
),
48 max_partial_texture_updates(std::numeric_limits
<size_t>::max()),
49 default_tile_size(gfx::Size(256, 256)),
50 max_untiled_layer_size(gfx::Size(512, 512)),
51 minimum_occlusion_tracking_size(gfx::Size(160, 160)),
52 use_pinch_zoom_scrollbars(false),
53 use_pinch_virtual_viewport(false),
54 // At 256x256 tiles, 128 tiles cover an area of 2048x4096 pixels.
55 max_tiles_for_interest_area(128),
56 skewport_target_time_multiplier(1.0f
),
57 skewport_extrapolation_limit_in_content_pixels(2000),
58 max_unused_resource_memory_percentage(100),
59 max_memory_for_prepaint_percentage(100),
60 highp_threshold_min(0),
61 strict_layer_property_change_checking(false),
64 ignore_root_layer_flings(false),
65 use_rgba_4444_textures(false),
66 texture_id_allocation_chunk_size(64),
67 use_occlusion_for_tile_prioritization(false),
68 record_full_layer(false) {
71 LayerTreeSettings::~LayerTreeSettings() {}