Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: cc/trees/layer_tree_settings.h

Issue 2021433005: cc: Make LayerTreeSettings have in-member initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CC_TREES_LAYER_TREE_SETTINGS_H_ 5 #ifndef CC_TREES_LAYER_TREE_SETTINGS_H_
6 #define CC_TREES_LAYER_TREE_SETTINGS_H_ 6 #define CC_TREES_LAYER_TREE_SETTINGS_H_
7 7
8 #include <GLES2/gl2.h>
danakj 2016/05/31 20:28:58 I think I prefer include "third_party/khronos/GLES
vmpstr 2016/05/31 21:01:43 Done.
8 #include <stddef.h> 9 #include <stddef.h>
9 10
10 #include <vector> 11 #include <vector>
11 12
12 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
13 #include "cc/debug/layer_tree_debug_state.h" 14 #include "cc/debug/layer_tree_debug_state.h"
14 #include "cc/output/managed_memory_policy.h" 15 #include "cc/output/managed_memory_policy.h"
15 #include "cc/output/renderer_settings.h" 16 #include "cc/output/renderer_settings.h"
16 #include "cc/scheduler/scheduler_settings.h" 17 #include "cc/scheduler/scheduler_settings.h"
17 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
(...skipping 12 matching lines...) Expand all
30 virtual ~LayerTreeSettings(); 31 virtual ~LayerTreeSettings();
31 32
32 bool operator==(const LayerTreeSettings& other) const; 33 bool operator==(const LayerTreeSettings& other) const;
33 34
34 void ToProtobuf(proto::LayerTreeSettings* proto) const; 35 void ToProtobuf(proto::LayerTreeSettings* proto) const;
35 void FromProtobuf(const proto::LayerTreeSettings& proto); 36 void FromProtobuf(const proto::LayerTreeSettings& proto);
36 37
37 SchedulerSettings ToSchedulerSettings() const; 38 SchedulerSettings ToSchedulerSettings() const;
38 39
39 RendererSettings renderer_settings; 40 RendererSettings renderer_settings;
40 bool single_thread_proxy_scheduler; 41 bool single_thread_proxy_scheduler = true;
41 // TODO(enne): Remove this after everything uses output surface begin frames. 42 // TODO(enne): Remove this after everything uses output surface begin frames.
42 bool use_external_begin_frame_source; 43 bool use_external_begin_frame_source = false;
43 // TODO(enne): Temporary staging for unified begin frame source work. 44 // TODO(enne): Temporary staging for unified begin frame source work.
44 bool use_output_surface_begin_frame_source; 45 bool use_output_surface_begin_frame_source = false;
45 bool main_frame_before_activation_enabled; 46 bool main_frame_before_activation_enabled = false;
46 bool using_synchronous_renderer_compositor; 47 bool using_synchronous_renderer_compositor = false;
47 bool can_use_lcd_text; 48 bool can_use_lcd_text = true;
48 bool use_distance_field_text; 49 bool use_distance_field_text = false;
49 bool gpu_rasterization_enabled; 50 bool gpu_rasterization_enabled = false;
50 bool gpu_rasterization_forced; 51 bool gpu_rasterization_forced = false;
51 bool async_worker_context_enabled; 52 bool async_worker_context_enabled = false;
52 int gpu_rasterization_msaa_sample_count; 53 int gpu_rasterization_msaa_sample_count = 0;
53 float gpu_rasterization_skewport_target_time_in_seconds; 54 float gpu_rasterization_skewport_target_time_in_seconds = 0.2f;
54 bool create_low_res_tiling; 55 bool create_low_res_tiling = false;
55 56
56 enum ScrollbarAnimator { 57 enum ScrollbarAnimator {
57 NO_ANIMATOR, 58 NO_ANIMATOR,
58 LINEAR_FADE, 59 LINEAR_FADE,
59 THINNING, 60 THINNING,
60 }; 61 };
61 ScrollbarAnimator scrollbar_animator; 62 ScrollbarAnimator scrollbar_animator = NO_ANIMATOR;
62 int scrollbar_fade_delay_ms; 63 int scrollbar_fade_delay_ms = 0;
63 int scrollbar_fade_resize_delay_ms; 64 int scrollbar_fade_resize_delay_ms = 0;
64 int scrollbar_fade_duration_ms; 65 int scrollbar_fade_duration_ms = 0;
65 SkColor solid_color_scrollbar_color; 66 SkColor solid_color_scrollbar_color = SK_ColorWHITE;
66 bool timeout_and_draw_when_animation_checkerboards; 67 bool timeout_and_draw_when_animation_checkerboards = true;
67 bool layer_transforms_should_scale_layer_contents; 68 bool layer_transforms_should_scale_layer_contents = false;
68 bool layers_always_allowed_lcd_text; 69 bool layers_always_allowed_lcd_text = false;
69 float minimum_contents_scale; 70 float minimum_contents_scale = 0.0625f;
70 float low_res_contents_scale_factor; 71 float low_res_contents_scale_factor = 0.25f;
71 float top_controls_show_threshold; 72 float top_controls_show_threshold = 0.5f;
72 float top_controls_hide_threshold; 73 float top_controls_hide_threshold = 0.5f;
73 double background_animation_rate; 74 double background_animation_rate = 1.0;
74 gfx::Size default_tile_size; 75 gfx::Size default_tile_size = gfx::Size(256, 256);
danakj 2016/05/31 20:28:58 This does compile as a copy. But we make these Lay
vmpstr 2016/05/31 21:01:43 It does?
75 gfx::Size max_untiled_layer_size; 76 gfx::Size max_untiled_layer_size = gfx::Size(512, 512);
76 gfx::Size minimum_occlusion_tracking_size; 77 gfx::Size minimum_occlusion_tracking_size = gfx::Size(160, 160);
77 int tiling_interest_area_padding; 78 // 3000 pixels should give sufficient area for prepainting.
78 float skewport_target_time_in_seconds; 79 int tiling_interest_area_padding = 3000;
79 int skewport_extrapolation_limit_in_screen_pixels; 80 float skewport_target_time_in_seconds = 1.0f;
80 size_t max_memory_for_prepaint_percentage; 81 int skewport_extrapolation_limit_in_screen_pixels = 2000;
81 bool use_zero_copy; 82 size_t max_memory_for_prepaint_percentage = 100;
82 bool use_partial_raster; 83 bool use_zero_copy = false;
83 bool enable_elastic_overscroll; 84 bool use_partial_raster = false;
85 bool enable_elastic_overscroll = false;
84 // An array of image texture targets for each GpuMemoryBuffer format. 86 // An array of image texture targets for each GpuMemoryBuffer format.
85 std::vector<unsigned> use_image_texture_targets; 87 std::vector<unsigned> use_image_texture_targets =
86 bool ignore_root_layer_flings; 88 std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1,
danakj 2016/05/31 20:28:58 copying vectors tho seems like bad practice. I thi
vmpstr 2016/05/31 21:01:43 I think this would be elided or at the very least
87 size_t scheduled_raster_task_limit; 89 GL_TEXTURE_2D);
88 bool use_occlusion_for_tile_prioritization; 90 bool ignore_root_layer_flings = false;
89 bool verify_clip_tree_calculations; 91 size_t scheduled_raster_task_limit = 32;
90 bool image_decode_tasks_enabled; 92 bool use_occlusion_for_tile_prioritization = false;
91 bool wait_for_beginframe_interval; 93 bool verify_clip_tree_calculations = false;
92 bool abort_commit_before_output_surface_creation; 94 bool image_decode_tasks_enabled = false;
93 bool use_mouse_wheel_gestures; 95 bool wait_for_beginframe_interval = true;
94 bool use_layer_lists; 96 bool abort_commit_before_output_surface_creation = true;
95 int max_staging_buffer_usage_in_bytes; 97 bool use_mouse_wheel_gestures = false;
96 ManagedMemoryPolicy memory_policy_; 98 bool use_layer_lists = false;
97 size_t gpu_decoded_image_budget_bytes; 99 int max_staging_buffer_usage_in_bytes = 32 * 1024 * 1024;
98 size_t software_decoded_image_budget_bytes; 100 ManagedMemoryPolicy memory_policy_ =
101 ManagedMemoryPolicy(64 * 1024 * 1024,
102 gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
103 ManagedMemoryPolicy::kDefaultNumResourcesLimit);
104 size_t gpu_decoded_image_budget_bytes = 96 * 1024 * 1024;
105 size_t software_decoded_image_budget_bytes = 128 * 1024 * 1024;
99 106
100 // If set to true, the display item list will internally cache a SkPicture for 107 // If set to true, the display item list will internally cache a SkPicture for
101 // raster rather than directly using the display items. 108 // raster rather than directly using the display items.
102 bool use_cached_picture_raster; 109 bool use_cached_picture_raster = true;
103 110
104 LayerTreeDebugState initial_debug_state; 111 LayerTreeDebugState initial_debug_state;
105 }; 112 };
106 113
107 } // namespace cc 114 } // namespace cc
108 115
109 #endif // CC_TREES_LAYER_TREE_SETTINGS_H_ 116 #endif // CC_TREES_LAYER_TREE_SETTINGS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698