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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 settings.renderer_settings.disable_display_vsync = true; | 239 settings.renderer_settings.disable_display_vsync = true; |
240 settings.wait_for_beginframe_interval = false; | 240 settings.wait_for_beginframe_interval = false; |
241 } | 241 } |
242 } | 242 } |
243 settings.main_frame_before_activation_enabled = | 243 settings.main_frame_before_activation_enabled = |
244 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 244 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
245 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 245 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
246 settings.accelerated_animation_enabled = | 246 settings.accelerated_animation_enabled = |
247 compositor_deps_->IsThreadedAnimationEnabled(); | 247 compositor_deps_->IsThreadedAnimationEnabled(); |
248 | 248 |
249 settings.use_compositor_animation_timelines = | 249 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { |
250 !cmd->HasSwitch(switches::kDisableCompositorAnimationTimelines); | 250 settings.use_compositor_animation_timelines = true; |
251 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines( | 251 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); |
252 settings.use_compositor_animation_timelines); | 252 } |
253 | 253 |
254 settings.default_tile_size = CalculateDefaultTileSize(widget_); | 254 settings.default_tile_size = CalculateDefaultTileSize(widget_); |
255 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 255 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
256 int tile_width = 0; | 256 int tile_width = 0; |
257 GetSwitchValueAsInt(*cmd, | 257 GetSwitchValueAsInt(*cmd, |
258 switches::kDefaultTileWidth, | 258 switches::kDefaultTileWidth, |
259 1, | 259 1, |
260 std::numeric_limits<int>::max(), | 260 std::numeric_limits<int>::max(), |
261 &tile_width); | 261 &tile_width); |
262 settings.default_tile_size.set_width(tile_width); | 262 settings.default_tile_size.set_width(tile_width); |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 // Ignore what the system said and give all clients the same maximum | 1090 // Ignore what the system said and give all clients the same maximum |
1091 // allocation on desktop platforms. | 1091 // allocation on desktop platforms. |
1092 actual.bytes_limit_when_visible = 512 * 1024 * 1024; | 1092 actual.bytes_limit_when_visible = 512 * 1024 * 1024; |
1093 actual.priority_cutoff_when_visible = | 1093 actual.priority_cutoff_when_visible = |
1094 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; | 1094 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
1095 #endif | 1095 #endif |
1096 return actual; | 1096 return actual; |
1097 } | 1097 } |
1098 | 1098 |
1099 } // namespace content | 1099 } // namespace content |
OLD | NEW |