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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 settings.throttle_frame_production = | 224 settings.throttle_frame_production = |
225 !cmd->HasSwitch(switches::kDisableGpuVsync); | 225 !cmd->HasSwitch(switches::kDisableGpuVsync); |
226 settings.main_frame_before_activation_enabled = | 226 settings.main_frame_before_activation_enabled = |
227 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 227 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
228 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 228 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
229 settings.report_overscroll_only_for_scrollable_axes = | 229 settings.report_overscroll_only_for_scrollable_axes = |
230 !compositor_deps_->IsElasticOverscrollEnabled(); | 230 !compositor_deps_->IsElasticOverscrollEnabled(); |
231 settings.accelerated_animation_enabled = | 231 settings.accelerated_animation_enabled = |
232 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 232 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
233 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); | 233 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); |
| 234 settings.hud_layer_settings = cc_blink::WebLayerImpl::LayerSettings(); |
234 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { | 235 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { |
235 settings.use_compositor_animation_timelines = true; | |
236 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); | 236 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); |
237 } | 237 } |
238 | 238 |
239 settings.default_tile_size = CalculateDefaultTileSize(widget_); | 239 settings.default_tile_size = CalculateDefaultTileSize(widget_); |
240 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 240 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
241 int tile_width = 0; | 241 int tile_width = 0; |
242 GetSwitchValueAsInt(*cmd, | 242 GetSwitchValueAsInt(*cmd, |
243 switches::kDefaultTileWidth, | 243 switches::kDefaultTileWidth, |
244 1, | 244 1, |
245 std::numeric_limits<int>::max(), | 245 std::numeric_limits<int>::max(), |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 cc::ContextProvider* provider = | 971 cc::ContextProvider* provider = |
972 compositor_deps_->GetSharedMainThreadContextProvider(); | 972 compositor_deps_->GetSharedMainThreadContextProvider(); |
973 // provider can be NULL after the GPU process crashed enough times and we | 973 // provider can be NULL after the GPU process crashed enough times and we |
974 // don't want to restart it any more (falling back to software). | 974 // don't want to restart it any more (falling back to software). |
975 if (!provider) | 975 if (!provider) |
976 return; | 976 return; |
977 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 977 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
978 } | 978 } |
979 | 979 |
980 } // namespace content | 980 } // namespace content |
OLD | NEW |