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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 cc::LayerTreeSettings settings; | 89 cc::LayerTreeSettings settings; |
90 | 90 |
91 // For web contents, layer transforms should scale up the contents of layers | 91 // For web contents, layer transforms should scale up the contents of layers |
92 // to keep content always crisp when possible. | 92 // to keep content always crisp when possible. |
93 settings.layer_transforms_should_scale_layer_contents = true; | 93 settings.layer_transforms_should_scale_layer_contents = true; |
94 | 94 |
95 settings.throttle_frame_production = | 95 settings.throttle_frame_production = |
96 !cmd->HasSwitch(switches::kDisableGpuVsync); | 96 !cmd->HasSwitch(switches::kDisableGpuVsync); |
97 settings.begin_frame_scheduling_enabled = | 97 settings.begin_frame_scheduling_enabled = |
98 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 98 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); |
| 99 settings.deadline_scheduling_enabled = |
| 100 cc::switches::IsDeadlineSchedulingEnabled(); |
99 settings.using_synchronous_renderer_compositor = | 101 settings.using_synchronous_renderer_compositor = |
100 widget->UsingSynchronousRendererCompositor(); | 102 widget->UsingSynchronousRendererCompositor(); |
101 settings.per_tile_painting_enabled = | 103 settings.per_tile_painting_enabled = |
102 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); | 104 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); |
103 settings.accelerated_animation_enabled = | 105 settings.accelerated_animation_enabled = |
104 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 106 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
105 settings.force_direct_layer_drawing = | 107 settings.force_direct_layer_drawing = |
106 cmd->HasSwitch(cc::switches::kForceDirectLayerDrawing); | 108 cmd->HasSwitch(cc::switches::kForceDirectLayerDrawing); |
107 | 109 |
108 int default_tile_width = settings.default_tile_size.width(); | 110 int default_tile_width = settings.default_tile_size.width(); |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 585 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
584 } | 586 } |
585 | 587 |
586 scoped_refptr<cc::ContextProvider> | 588 scoped_refptr<cc::ContextProvider> |
587 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 589 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
588 return RenderThreadImpl::current()-> | 590 return RenderThreadImpl::current()-> |
589 OffscreenContextProviderForCompositorThread(); | 591 OffscreenContextProviderForCompositorThread(); |
590 } | 592 } |
591 | 593 |
592 } // namespace content | 594 } // namespace content |
OLD | NEW |