Chromium Code Reviews| 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 = |
|
danakj
2015/07/01 19:47:23
wow is this confusing.
we have 2 flags that you c
brianderson
2015/07/01 20:51:57
From a code readability perspective, I agree it's
| |
| 228 cmd->HasSwitch(switches::kDisableGpuVsync); | 228 (cmd->HasSwitch(switches::kDisableGpuVsync) || |
| 229 cmd->HasSwitch(switches::kDisableDisplayVsync)); | |
| 230 settings.throttle_frame_production = | |
| 231 !(cmd->HasSwitch(switches::kDisableGpuVsync) || | |
| 232 cmd->HasSwitch(cc::switches::kDisableBeginFrameInterval)); | |
| 233 | |
| 229 settings.main_frame_before_activation_enabled = | 234 settings.main_frame_before_activation_enabled = |
| 230 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 235 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 231 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 236 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 232 settings.report_overscroll_only_for_scrollable_axes = | 237 settings.report_overscroll_only_for_scrollable_axes = |
| 233 !compositor_deps_->IsElasticOverscrollEnabled(); | 238 !compositor_deps_->IsElasticOverscrollEnabled(); |
| 234 settings.accelerated_animation_enabled = | 239 settings.accelerated_animation_enabled = |
| 235 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 240 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 236 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); | 241 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); |
| 237 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { | 242 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { |
| 238 settings.use_compositor_animation_timelines = true; | 243 settings.use_compositor_animation_timelines = true; |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1001 return; | 1006 return; |
| 1002 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 1007 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 1003 } | 1008 } |
| 1004 | 1009 |
| 1005 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1010 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 1006 uint32_t surface_id_namespace) { | 1011 uint32_t surface_id_namespace) { |
| 1007 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1012 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 1008 } | 1013 } |
| 1009 | 1014 |
| 1010 } // namespace content | 1015 } // namespace content |
| OLD | NEW |