| OLD | NEW |
| 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 <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 settings.renderer_settings.disable_display_vsync = true; | 242 settings.renderer_settings.disable_display_vsync = true; |
| 243 settings.wait_for_beginframe_interval = false; | 243 settings.wait_for_beginframe_interval = false; |
| 244 } | 244 } |
| 245 } | 245 } |
| 246 settings.main_frame_before_activation_enabled = | 246 settings.main_frame_before_activation_enabled = |
| 247 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 247 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 248 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 248 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 249 settings.accelerated_animation_enabled = | 249 settings.accelerated_animation_enabled = |
| 250 compositor_deps_->IsThreadedAnimationEnabled(); | 250 compositor_deps_->IsThreadedAnimationEnabled(); |
| 251 | 251 |
| 252 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { | 252 settings.use_compositor_animation_timelines = |
| 253 settings.use_compositor_animation_timelines = true; | 253 !cmd->HasSwitch(switches::kDisableCompositorAnimationTimelines); |
| 254 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); | 254 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines( |
| 255 } | 255 settings.use_compositor_animation_timelines); |
| 256 | 256 |
| 257 settings.default_tile_size = CalculateDefaultTileSize(widget_); | 257 settings.default_tile_size = CalculateDefaultTileSize(widget_); |
| 258 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 258 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
| 259 int tile_width = 0; | 259 int tile_width = 0; |
| 260 GetSwitchValueAsInt(*cmd, | 260 GetSwitchValueAsInt(*cmd, |
| 261 switches::kDefaultTileWidth, | 261 switches::kDefaultTileWidth, |
| 262 1, | 262 1, |
| 263 std::numeric_limits<int>::max(), | 263 std::numeric_limits<int>::max(), |
| 264 &tile_width); | 264 &tile_width); |
| 265 settings.default_tile_size.set_width(tile_width); | 265 settings.default_tile_size.set_width(tile_width); |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 #endif | 1115 #endif |
| 1116 return actual; | 1116 return actual; |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1119 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
| 1120 float device_scale) { | 1120 float device_scale) { |
| 1121 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1121 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 } // namespace content | 1124 } // namespace content |
| OLD | NEW |