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

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

Issue 1986843003: Add feature for main frame before activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 4 years, 7 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 | « content/public/common/content_features.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 if (display_vsync_string == "gpu") { 240 if (display_vsync_string == "gpu") {
241 settings.renderer_settings.disable_display_vsync = true; 241 settings.renderer_settings.disable_display_vsync = true;
242 } else if (display_vsync_string == "beginframe") { 242 } else if (display_vsync_string == "beginframe") {
243 settings.wait_for_beginframe_interval = false; 243 settings.wait_for_beginframe_interval = false;
244 } else { 244 } else {
245 settings.renderer_settings.disable_display_vsync = true; 245 settings.renderer_settings.disable_display_vsync = true;
246 settings.wait_for_beginframe_interval = false; 246 settings.wait_for_beginframe_interval = false;
247 } 247 }
248 } 248 }
249 settings.main_frame_before_activation_enabled = 249 settings.main_frame_before_activation_enabled =
250 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && 250 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
251 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
252 settings.use_mouse_wheel_gestures = UseGestureBasedWheelScrolling(); 251 settings.use_mouse_wheel_gestures = UseGestureBasedWheelScrolling();
253 252
254 settings.default_tile_size = CalculateDefaultTileSize(device_scale_factor); 253 settings.default_tile_size = CalculateDefaultTileSize(device_scale_factor);
255 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 254 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
256 int tile_width = 0; 255 int tile_width = 0;
257 GetSwitchValueAsInt(*cmd, 256 GetSwitchValueAsInt(*cmd,
258 switches::kDefaultTileWidth, 257 switches::kDefaultTileWidth,
259 1, 258 1,
260 std::numeric_limits<int>::max(), 259 std::numeric_limits<int>::max(),
261 &tile_width); 260 &tile_width);
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 #endif 1122 #endif
1124 return actual; 1123 return actual;
1125 } 1124 }
1126 1125
1127 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1126 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1128 float device_scale) { 1127 float device_scale) {
1129 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1128 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1130 } 1129 }
1131 1130
1132 } // namespace content 1131 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698