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