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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2047093002: Remove enable/disable wheel gestures setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@can_scroll_remove
Patch Set: Remove unused, uninitialized variable on mac causing occasional failure 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 26 matching lines...) Expand all
37 #include "cc/output/swap_promise.h" 37 #include "cc/output/swap_promise.h"
38 #include "cc/proto/compositor_message.pb.h" 38 #include "cc/proto/compositor_message.pb.h"
39 #include "cc/resources/single_release_callback.h" 39 #include "cc/resources/single_release_callback.h"
40 #include "cc/scheduler/begin_frame_source.h" 40 #include "cc/scheduler/begin_frame_source.h"
41 #include "cc/trees/latency_info_swap_promise_monitor.h" 41 #include "cc/trees/latency_info_swap_promise_monitor.h"
42 #include "cc/trees/layer_tree_host.h" 42 #include "cc/trees/layer_tree_host.h"
43 #include "cc/trees/remote_proto_channel.h" 43 #include "cc/trees/remote_proto_channel.h"
44 #include "components/scheduler/renderer/renderer_scheduler.h" 44 #include "components/scheduler/renderer/renderer_scheduler.h"
45 #include "content/common/content_switches_internal.h" 45 #include "content/common/content_switches_internal.h"
46 #include "content/common/gpu/client/context_provider_command_buffer.h" 46 #include "content/common/gpu/client/context_provider_command_buffer.h"
47 #include "content/common/input/input_event_utils.h"
48 #include "content/public/common/content_client.h" 47 #include "content/public/common/content_client.h"
49 #include "content/public/common/content_switches.h" 48 #include "content/public/common/content_switches.h"
50 #include "content/renderer/gpu/render_widget_compositor_delegate.h" 49 #include "content/renderer/gpu/render_widget_compositor_delegate.h"
51 #include "content/renderer/input/input_handler_manager.h" 50 #include "content/renderer/input/input_handler_manager.h"
52 #include "gpu/command_buffer/client/gles2_interface.h" 51 #include "gpu/command_buffer/client/gles2_interface.h"
53 #include "gpu/command_buffer/service/gpu_switches.h" 52 #include "gpu/command_buffer/service/gpu_switches.h"
54 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h" 53 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h"
55 #include "third_party/WebKit/public/platform/WebCompositorMutatorClient.h" 54 #include "third_party/WebKit/public/platform/WebCompositorMutatorClient.h"
56 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h" 55 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
57 #include "third_party/WebKit/public/platform/WebSize.h" 56 #include "third_party/WebKit/public/platform/WebSize.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 settings.renderer_settings.disable_display_vsync = true; 242 settings.renderer_settings.disable_display_vsync = true;
244 } else if (display_vsync_string == "beginframe") { 243 } else if (display_vsync_string == "beginframe") {
245 settings.wait_for_beginframe_interval = false; 244 settings.wait_for_beginframe_interval = false;
246 } else { 245 } else {
247 settings.renderer_settings.disable_display_vsync = true; 246 settings.renderer_settings.disable_display_vsync = true;
248 settings.wait_for_beginframe_interval = false; 247 settings.wait_for_beginframe_interval = false;
249 } 248 }
250 } 249 }
251 settings.main_frame_before_activation_enabled = 250 settings.main_frame_before_activation_enabled =
252 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); 251 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
253 settings.use_mouse_wheel_gestures = UseGestureBasedWheelScrolling();
254 252
255 settings.default_tile_size = CalculateDefaultTileSize(device_scale_factor); 253 settings.default_tile_size = CalculateDefaultTileSize(device_scale_factor);
256 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 254 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
257 int tile_width = 0; 255 int tile_width = 0;
258 GetSwitchValueAsInt(*cmd, 256 GetSwitchValueAsInt(*cmd,
259 switches::kDefaultTileWidth, 257 switches::kDefaultTileWidth,
260 1, 258 1,
261 std::numeric_limits<int>::max(), 259 std::numeric_limits<int>::max(),
262 &tile_width); 260 &tile_width);
263 settings.default_tile_size.set_width(tile_width); 261 settings.default_tile_size.set_width(tile_width);
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 #endif 1156 #endif
1159 return actual; 1157 return actual;
1160 } 1158 }
1161 1159
1162 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1160 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1163 float device_scale) { 1161 float device_scale) {
1164 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1162 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1165 } 1163 }
1166 1164
1167 } // namespace content 1165 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698