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 #ifndef CC_TREES_LAYER_TREE_SETTINGS_H_
6 #define CC_TREES_LAYER_TREE_SETTINGS_H_
8 #include "base/basictypes.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/debug/layer_tree_debug_state.h"
11 #include "cc/output/renderer_settings.h"
12 #include "cc/scheduler/scheduler_settings.h"
13 #include "third_party/skia/include/core/SkColor.h"
14 #include "ui/gfx/geometry/size.h"
18 class CC_EXPORT LayerTreeSettings
{
23 RendererSettings renderer_settings
;
24 bool impl_side_painting
;
26 bool throttle_frame_production
;
27 bool single_thread_proxy_scheduler
;
28 bool use_external_begin_frame_source
;
29 bool main_frame_before_activation_enabled
;
30 bool using_synchronous_renderer_compositor
;
31 bool report_overscroll_only_for_scrollable_axes
;
32 bool per_tile_painting_enabled
;
33 bool accelerated_animation_enabled
;
34 bool can_use_lcd_text
;
35 bool use_distance_field_text
;
36 bool gpu_rasterization_enabled
;
37 bool gpu_rasterization_forced
;
38 int gpu_rasterization_msaa_sample_count
;
39 float gpu_rasterization_skewport_target_time_in_seconds
;
40 bool create_low_res_tiling
;
42 enum ScrollbarAnimator
{
47 ScrollbarAnimator scrollbar_animator
;
48 int scrollbar_fade_delay_ms
;
49 int scrollbar_fade_resize_delay_ms
;
50 int scrollbar_fade_duration_ms
;
51 float scrollbar_show_scale_threshold
;
52 SkColor solid_color_scrollbar_color
;
53 bool timeout_and_draw_when_animation_checkerboards
;
54 int maximum_number_of_failed_draws_before_draw_is_forced_
;
55 bool layer_transforms_should_scale_layer_contents
;
56 bool layers_always_allowed_lcd_text
;
57 float minimum_contents_scale
;
58 float low_res_contents_scale_factor
;
59 float top_controls_show_threshold
;
60 float top_controls_hide_threshold
;
61 double background_animation_rate
;
62 size_t max_partial_texture_updates
;
63 gfx::Size default_tile_size
;
64 gfx::Size max_untiled_layer_size
;
65 gfx::Size default_tile_grid_size
;
66 gfx::Size minimum_occlusion_tracking_size
;
67 bool use_pinch_zoom_scrollbars
;
68 bool use_pinch_virtual_viewport
;
69 size_t max_tiles_for_interest_area
;
70 float skewport_target_time_in_seconds
;
71 int skewport_extrapolation_limit_in_content_pixels
;
72 size_t max_unused_resource_memory_percentage
;
73 size_t max_memory_for_prepaint_percentage
;
74 bool strict_layer_property_change_checking
;
77 bool enable_elastic_overscroll
;
78 unsigned use_image_texture_target
;
79 bool ignore_root_layer_flings
;
80 size_t scheduled_raster_task_limit
;
81 bool use_occlusion_for_tile_prioritization
;
82 bool record_full_layer
;
83 bool use_display_lists
;
84 bool verify_property_trees
;
85 bool gather_pixel_refs
;
86 bool use_compositor_animation_timelines
;
88 LayerTreeDebugState initial_debug_state
;
90 SchedulerSettings
ToSchedulerSettings() const;
95 #endif // CC_TREES_LAYER_TREE_SETTINGS_H_