| 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 return; | 964 return; |
| 965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 968 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 969 uint32_t surface_id_namespace) { | 969 uint32_t surface_id_namespace) { |
| 970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 971 } | 971 } |
| 972 | 972 |
| 973 } // namespace content | 973 } // namespace content |
| OLD | NEW |