| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 settings.renderer_settings.disable_gpu_vsync = | 227 settings.renderer_settings.disable_gpu_vsync = |
| 228 cmd->HasSwitch(switches::kDisableGpuVsync); | 228 cmd->HasSwitch(switches::kDisableGpuVsync); |
| 229 settings.main_frame_before_activation_enabled = | 229 settings.main_frame_before_activation_enabled = |
| 230 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 230 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 231 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 231 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 232 settings.report_overscroll_only_for_scrollable_axes = | 232 settings.report_overscroll_only_for_scrollable_axes = |
| 233 !compositor_deps_->IsElasticOverscrollEnabled(); | 233 !compositor_deps_->IsElasticOverscrollEnabled(); |
| 234 settings.accelerated_animation_enabled = | 234 settings.accelerated_animation_enabled = |
| 235 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 235 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 236 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); | 236 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint) || |
| 237 !cmd->HasSwitch(switches::kDisableSlimmingPaint); |
| 237 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { | 238 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { |
| 238 settings.use_compositor_animation_timelines = true; | 239 settings.use_compositor_animation_timelines = true; |
| 239 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); | 240 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); |
| 240 } | 241 } |
| 241 | 242 |
| 242 settings.default_tile_size = CalculateDefaultTileSize(widget_); | 243 settings.default_tile_size = CalculateDefaultTileSize(widget_); |
| 243 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 244 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
| 244 int tile_width = 0; | 245 int tile_width = 0; |
| 245 GetSwitchValueAsInt(*cmd, | 246 GetSwitchValueAsInt(*cmd, |
| 246 switches::kDefaultTileWidth, | 247 switches::kDefaultTileWidth, |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 return; | 1002 return; |
| 1002 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 1003 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 1003 } | 1004 } |
| 1004 | 1005 |
| 1005 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1006 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 1006 uint32_t surface_id_namespace) { | 1007 uint32_t surface_id_namespace) { |
| 1007 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1008 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 1008 } | 1009 } |
| 1009 | 1010 |
| 1010 } // namespace content | 1011 } // namespace content |
| OLD | NEW |