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

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

Issue 2050033002: Revert of Remove enable/disable wheel gestures setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@can_scroll_remove
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 | « cc/trees/layer_tree_settings.h ('k') | components/test_runner/event_sender.h » ('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 #include "cc/trees/layer_tree_settings.h" 5 #include "cc/trees/layer_tree_settings.h"
6 6
7 #include "cc/proto/gfx_conversions.h" 7 #include "cc/proto/gfx_conversions.h"
8 #include "cc/proto/layer_tree_settings.pb.h" 8 #include "cc/proto/layer_tree_settings.pb.h"
9 #include "third_party/khronos/GLES2/gl2.h" 9 #include "third_party/khronos/GLES2/gl2.h"
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 use_partial_raster == other.use_partial_raster && 109 use_partial_raster == other.use_partial_raster &&
110 enable_elastic_overscroll == other.enable_elastic_overscroll && 110 enable_elastic_overscroll == other.enable_elastic_overscroll &&
111 use_image_texture_targets == other.use_image_texture_targets && 111 use_image_texture_targets == other.use_image_texture_targets &&
112 ignore_root_layer_flings == other.ignore_root_layer_flings && 112 ignore_root_layer_flings == other.ignore_root_layer_flings &&
113 scheduled_raster_task_limit == other.scheduled_raster_task_limit && 113 scheduled_raster_task_limit == other.scheduled_raster_task_limit &&
114 use_occlusion_for_tile_prioritization == 114 use_occlusion_for_tile_prioritization ==
115 other.use_occlusion_for_tile_prioritization && 115 other.use_occlusion_for_tile_prioritization &&
116 verify_clip_tree_calculations == other.verify_clip_tree_calculations && 116 verify_clip_tree_calculations == other.verify_clip_tree_calculations &&
117 image_decode_tasks_enabled == other.image_decode_tasks_enabled && 117 image_decode_tasks_enabled == other.image_decode_tasks_enabled &&
118 wait_for_beginframe_interval == other.wait_for_beginframe_interval && 118 wait_for_beginframe_interval == other.wait_for_beginframe_interval &&
119 use_mouse_wheel_gestures == other.use_mouse_wheel_gestures &&
119 max_staging_buffer_usage_in_bytes == 120 max_staging_buffer_usage_in_bytes ==
120 other.max_staging_buffer_usage_in_bytes && 121 other.max_staging_buffer_usage_in_bytes &&
121 memory_policy_ == other.memory_policy_ && 122 memory_policy_ == other.memory_policy_ &&
122 LayerTreeDebugState::Equal(initial_debug_state, 123 LayerTreeDebugState::Equal(initial_debug_state,
123 other.initial_debug_state) && 124 other.initial_debug_state) &&
124 use_cached_picture_raster == other.use_cached_picture_raster; 125 use_cached_picture_raster == other.use_cached_picture_raster;
125 } 126 }
126 127
127 void LayerTreeSettings::ToProtobuf(proto::LayerTreeSettings* proto) const { 128 void LayerTreeSettings::ToProtobuf(proto::LayerTreeSettings* proto) const {
128 renderer_settings.ToProtobuf(proto->mutable_renderer_settings()); 129 renderer_settings.ToProtobuf(proto->mutable_renderer_settings());
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 max_memory_for_prepaint_percentage); 169 max_memory_for_prepaint_percentage);
169 proto->set_use_zero_copy(use_zero_copy); 170 proto->set_use_zero_copy(use_zero_copy);
170 proto->set_use_partial_raster(use_partial_raster); 171 proto->set_use_partial_raster(use_partial_raster);
171 proto->set_enable_elastic_overscroll(enable_elastic_overscroll); 172 proto->set_enable_elastic_overscroll(enable_elastic_overscroll);
172 proto->set_ignore_root_layer_flings(ignore_root_layer_flings); 173 proto->set_ignore_root_layer_flings(ignore_root_layer_flings);
173 proto->set_scheduled_raster_task_limit(scheduled_raster_task_limit); 174 proto->set_scheduled_raster_task_limit(scheduled_raster_task_limit);
174 proto->set_use_occlusion_for_tile_prioritization( 175 proto->set_use_occlusion_for_tile_prioritization(
175 use_occlusion_for_tile_prioritization); 176 use_occlusion_for_tile_prioritization);
176 proto->set_image_decode_tasks_enabled(image_decode_tasks_enabled); 177 proto->set_image_decode_tasks_enabled(image_decode_tasks_enabled);
177 proto->set_wait_for_beginframe_interval(wait_for_beginframe_interval); 178 proto->set_wait_for_beginframe_interval(wait_for_beginframe_interval);
179 proto->set_use_mouse_wheel_gestures(use_mouse_wheel_gestures);
178 proto->set_max_staging_buffer_usage_in_bytes( 180 proto->set_max_staging_buffer_usage_in_bytes(
179 max_staging_buffer_usage_in_bytes); 181 max_staging_buffer_usage_in_bytes);
180 memory_policy_.ToProtobuf(proto->mutable_memory_policy()); 182 memory_policy_.ToProtobuf(proto->mutable_memory_policy());
181 initial_debug_state.ToProtobuf(proto->mutable_initial_debug_state()); 183 initial_debug_state.ToProtobuf(proto->mutable_initial_debug_state());
182 proto->set_use_cached_picture_raster(use_cached_picture_raster); 184 proto->set_use_cached_picture_raster(use_cached_picture_raster);
183 185
184 for (unsigned u : use_image_texture_targets) 186 for (unsigned u : use_image_texture_targets)
185 proto->add_use_image_texture_targets(u); 187 proto->add_use_image_texture_targets(u);
186 } 188 }
187 189
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 use_partial_raster = proto.use_partial_raster(); 233 use_partial_raster = proto.use_partial_raster();
232 enable_elastic_overscroll = proto.enable_elastic_overscroll(); 234 enable_elastic_overscroll = proto.enable_elastic_overscroll();
233 // |use_image_texture_targets| contains default values, so clear first. 235 // |use_image_texture_targets| contains default values, so clear first.
234 use_image_texture_targets.clear(); 236 use_image_texture_targets.clear();
235 ignore_root_layer_flings = proto.ignore_root_layer_flings(); 237 ignore_root_layer_flings = proto.ignore_root_layer_flings();
236 scheduled_raster_task_limit = proto.scheduled_raster_task_limit(); 238 scheduled_raster_task_limit = proto.scheduled_raster_task_limit();
237 use_occlusion_for_tile_prioritization = 239 use_occlusion_for_tile_prioritization =
238 proto.use_occlusion_for_tile_prioritization(); 240 proto.use_occlusion_for_tile_prioritization();
239 image_decode_tasks_enabled = proto.image_decode_tasks_enabled(); 241 image_decode_tasks_enabled = proto.image_decode_tasks_enabled();
240 wait_for_beginframe_interval = proto.wait_for_beginframe_interval(); 242 wait_for_beginframe_interval = proto.wait_for_beginframe_interval();
243 use_mouse_wheel_gestures = proto.use_mouse_wheel_gestures();
241 max_staging_buffer_usage_in_bytes = proto.max_staging_buffer_usage_in_bytes(); 244 max_staging_buffer_usage_in_bytes = proto.max_staging_buffer_usage_in_bytes();
242 memory_policy_.FromProtobuf(proto.memory_policy()); 245 memory_policy_.FromProtobuf(proto.memory_policy());
243 initial_debug_state.FromProtobuf(proto.initial_debug_state()); 246 initial_debug_state.FromProtobuf(proto.initial_debug_state());
244 use_cached_picture_raster = proto.use_cached_picture_raster(); 247 use_cached_picture_raster = proto.use_cached_picture_raster();
245 248
246 for (int i = 0; i < proto.use_image_texture_targets_size(); ++i) 249 for (int i = 0; i < proto.use_image_texture_targets_size(); ++i)
247 use_image_texture_targets.push_back(proto.use_image_texture_targets(i)); 250 use_image_texture_targets.push_back(proto.use_image_texture_targets(i));
248 } 251 }
249 252
250 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const { 253 SchedulerSettings LayerTreeSettings::ToSchedulerSettings() const {
251 SchedulerSettings scheduler_settings; 254 SchedulerSettings scheduler_settings;
252 scheduler_settings.use_external_begin_frame_source = 255 scheduler_settings.use_external_begin_frame_source =
253 use_external_begin_frame_source; 256 use_external_begin_frame_source;
254 scheduler_settings.main_frame_before_activation_enabled = 257 scheduler_settings.main_frame_before_activation_enabled =
255 main_frame_before_activation_enabled; 258 main_frame_before_activation_enabled;
256 scheduler_settings.timeout_and_draw_when_animation_checkerboards = 259 scheduler_settings.timeout_and_draw_when_animation_checkerboards =
257 timeout_and_draw_when_animation_checkerboards; 260 timeout_and_draw_when_animation_checkerboards;
258 scheduler_settings.using_synchronous_renderer_compositor = 261 scheduler_settings.using_synchronous_renderer_compositor =
259 using_synchronous_renderer_compositor; 262 using_synchronous_renderer_compositor;
260 scheduler_settings.throttle_frame_production = wait_for_beginframe_interval; 263 scheduler_settings.throttle_frame_production = wait_for_beginframe_interval;
261 scheduler_settings.background_frame_interval = 264 scheduler_settings.background_frame_interval =
262 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate); 265 base::TimeDelta::FromSecondsD(1.0 / background_animation_rate);
263 scheduler_settings.abort_commit_before_output_surface_creation = 266 scheduler_settings.abort_commit_before_output_surface_creation =
264 abort_commit_before_output_surface_creation; 267 abort_commit_before_output_surface_creation;
265 return scheduler_settings; 268 return scheduler_settings;
266 } 269 }
267 270
268 } // namespace cc 271 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.h ('k') | components/test_runner/event_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698