Disable blink_perf.events on x64.
[chromium-blink-merge.git] / cc / trees / layer_tree_settings.cc
blobce8445e19375183bf17f05c142730448a8d00422
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"
7 #include <GLES2/gl2.h>
8 #include <limits>
10 #include "base/command_line.h"
11 #include "base/logging.h"
12 #include "base/strings/string_number_conversions.h"
14 namespace cc {
16 LayerTreeSettings::LayerTreeSettings()
17 : impl_side_painting(false),
18 raster_enabled(true),
19 throttle_frame_production(true),
20 single_thread_proxy_scheduler(true),
21 use_external_begin_frame_source(false),
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 accelerated_animation_enabled(true),
27 can_use_lcd_text(true),
28 use_distance_field_text(false),
29 gpu_rasterization_enabled(false),
30 gpu_rasterization_forced(false),
31 gpu_rasterization_msaa_sample_count(0),
32 gpu_rasterization_skewport_target_time_in_seconds(0.2f),
33 create_low_res_tiling(false),
34 scrollbar_animator(NO_ANIMATOR),
35 scrollbar_fade_delay_ms(0),
36 scrollbar_fade_resize_delay_ms(0),
37 scrollbar_fade_duration_ms(0),
38 scrollbar_show_scale_threshold(1.0f),
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),
43 layers_always_allowed_lcd_text(false),
44 minimum_contents_scale(0.0625f),
45 low_res_contents_scale_factor(0.25f),
46 top_controls_show_threshold(0.5f),
47 top_controls_hide_threshold(0.5f),
48 background_animation_rate(1.0),
49 max_partial_texture_updates(std::numeric_limits<size_t>::max()),
50 default_tile_size(gfx::Size(256, 256)),
51 max_untiled_layer_size(gfx::Size(512, 512)),
52 default_tile_grid_size(gfx::Size(256, 256)),
53 minimum_occlusion_tracking_size(gfx::Size(160, 160)),
54 use_pinch_zoom_scrollbars(false),
55 use_pinch_virtual_viewport(false),
56 // At 256x256 tiles, 128 tiles cover an area of 2048x4096 pixels.
57 max_tiles_for_interest_area(128),
58 skewport_target_time_in_seconds(1.0f),
59 skewport_extrapolation_limit_in_content_pixels(2000),
60 max_unused_resource_memory_percentage(100),
61 max_memory_for_prepaint_percentage(100),
62 strict_layer_property_change_checking(false),
63 use_one_copy(false),
64 use_zero_copy(false),
65 enable_elastic_overscroll(false),
66 use_image_texture_target(GL_TEXTURE_2D),
67 ignore_root_layer_flings(false),
68 scheduled_raster_task_limit(32),
69 use_occlusion_for_tile_prioritization(false),
70 record_full_layer(false),
71 use_display_lists(false),
72 verify_property_trees(false),
73 gather_pixel_refs(false),
74 use_compositor_animation_timelines(false) {
77 LayerTreeSettings::~LayerTreeSettings() {}
79 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const {
80 SchedulerSettings scheduler_settings;
81 scheduler_settings.use_external_begin_frame_source =
82 use_external_begin_frame_source;
83 scheduler_settings.main_frame_before_activation_enabled =
84 main_frame_before_activation_enabled;
85 scheduler_settings.impl_side_painting = impl_side_painting;
86 scheduler_settings.timeout_and_draw_when_animation_checkerboards =
87 timeout_and_draw_when_animation_checkerboards;
88 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ =
89 maximum_number_of_failed_draws_before_draw_is_forced_;
90 scheduler_settings.using_synchronous_renderer_compositor =
91 using_synchronous_renderer_compositor;
92 scheduler_settings.throttle_frame_production = throttle_frame_production;
93 scheduler_settings.main_thread_should_always_be_low_latency = false;
94 scheduler_settings.background_frame_interval =
95 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate);
96 return scheduler_settings;
99 } // namespace cc