| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 settings.renderer_settings.disable_gpu_vsync = | 230 settings.renderer_settings.disable_gpu_vsync = |
| 231 cmd->HasSwitch(switches::kDisableGpuVsync); | 231 cmd->HasSwitch(switches::kDisableGpuVsync); |
| 232 settings.main_frame_before_activation_enabled = | 232 settings.main_frame_before_activation_enabled = |
| 233 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 233 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 234 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 234 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 235 settings.report_overscroll_only_for_scrollable_axes = | 235 settings.report_overscroll_only_for_scrollable_axes = |
| 236 !compositor_deps_->IsElasticOverscrollEnabled(); | 236 !compositor_deps_->IsElasticOverscrollEnabled(); |
| 237 settings.accelerated_animation_enabled = | 237 settings.accelerated_animation_enabled = |
| 238 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 238 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 239 const std::string slimming_group = | 239 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); |
| 240 base::FieldTrialList::FindFullName("SlimmingPaint"); | |
| 241 settings.use_display_lists = | |
| 242 (cmd->HasSwitch(switches::kEnableSlimmingPaint) || | |
| 243 !cmd->HasSwitch(switches::kDisableSlimmingPaint)) && | |
| 244 (slimming_group != "DisableSlimmingPaint"); | |
| 245 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { | 240 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { |
| 246 settings.use_compositor_animation_timelines = true; | 241 settings.use_compositor_animation_timelines = true; |
| 247 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); | 242 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); |
| 248 } | 243 } |
| 249 | 244 |
| 250 settings.default_tile_size = CalculateDefaultTileSize(widget_); | 245 settings.default_tile_size = CalculateDefaultTileSize(widget_); |
| 251 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 246 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
| 252 int tile_width = 0; | 247 int tile_width = 0; |
| 253 GetSwitchValueAsInt(*cmd, | 248 GetSwitchValueAsInt(*cmd, |
| 254 switches::kDefaultTileWidth, | 249 switches::kDefaultTileWidth, |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 return; | 1032 return; |
| 1038 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 1033 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 1039 } | 1034 } |
| 1040 | 1035 |
| 1041 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1036 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 1042 uint32_t surface_id_namespace) { | 1037 uint32_t surface_id_namespace) { |
| 1043 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1038 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 1044 } | 1039 } |
| 1045 | 1040 |
| 1046 } // namespace content | 1041 } // namespace content |
| OLD | NEW |