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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 | 217 |
218 void RenderWidgetCompositor::Initialize() { | 218 void RenderWidgetCompositor::Initialize() { |
219 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 219 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
220 | 220 |
221 cc::LayerTreeSettings settings; | 221 cc::LayerTreeSettings settings; |
222 | 222 |
223 // For web contents, layer transforms should scale up the contents of layers | 223 // For web contents, layer transforms should scale up the contents of layers |
224 // to keep content always crisp when possible. | 224 // to keep content always crisp when possible. |
225 settings.layer_transforms_should_scale_layer_contents = true; | 225 settings.layer_transforms_should_scale_layer_contents = true; |
226 | 226 |
227 settings.renderer_settings.disable_gpu_vsync = | 227 settings.renderer_settings.disable_display_vsync = |
228 cmd->HasSwitch(switches::kDisableGpuVsync); | 228 (cmd->HasSwitch(switches::kDisableGpuVsync) |
229 ? true | |
230 : !cmd->HasSwitch(cc::switches::kDisableDisplayVsync)); | |
brianderson
2015/06/24 01:16:45
Can this (and elsehwere) be a simple OR:
cmd->Has
Jimmy Jo
2015/06/24 09:38:31
I misunderstood. When we turn on kDisableDisplayVs
| |
231 | |
229 settings.main_frame_before_activation_enabled = | 232 settings.main_frame_before_activation_enabled = |
230 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 233 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
231 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 234 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
232 settings.report_overscroll_only_for_scrollable_axes = | 235 settings.report_overscroll_only_for_scrollable_axes = |
233 !compositor_deps_->IsElasticOverscrollEnabled(); | 236 !compositor_deps_->IsElasticOverscrollEnabled(); |
234 settings.accelerated_animation_enabled = | 237 settings.accelerated_animation_enabled = |
235 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 238 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
236 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); | 239 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); |
237 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { | 240 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { |
238 settings.use_compositor_animation_timelines = true; | 241 settings.use_compositor_animation_timelines = true; |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1001 return; | 1004 return; |
1002 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 1005 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
1003 } | 1006 } |
1004 | 1007 |
1005 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1008 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
1006 uint32_t surface_id_namespace) { | 1009 uint32_t surface_id_namespace) { |
1007 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1010 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
1008 } | 1011 } |
1009 | 1012 |
1010 } // namespace content | 1013 } // namespace content |
OLD | NEW |