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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 cc::LayerTreeSettings settings; | 83 cc::LayerTreeSettings settings; |
84 | 84 |
85 // For web contents, layer transforms should scale up the contents of layers | 85 // For web contents, layer transforms should scale up the contents of layers |
86 // to keep content always crisp when possible. | 86 // to keep content always crisp when possible. |
87 settings.layer_transforms_should_scale_layer_contents = true; | 87 settings.layer_transforms_should_scale_layer_contents = true; |
88 | 88 |
89 settings.throttle_frame_production = | 89 settings.throttle_frame_production = |
90 !cmd->HasSwitch(switches::kDisableGpuVsync); | 90 !cmd->HasSwitch(switches::kDisableGpuVsync); |
91 settings.begin_impl_frame_scheduling_enabled = | 91 settings.begin_impl_frame_scheduling_enabled = |
92 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 92 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); |
93 settings.deadline_scheduling_enabled = | |
94 cmd->HasSwitch(switches::kEnableDeadlineScheduling) && | |
95 !cmd->HasSwitch(switches::kDisableDeadlineScheduling); | |
96 settings.using_synchronous_renderer_compositor = | 93 settings.using_synchronous_renderer_compositor = |
97 widget->UsingSynchronousRendererCompositor(); | 94 widget->UsingSynchronousRendererCompositor(); |
98 settings.accelerated_animation_enabled = | 95 settings.accelerated_animation_enabled = |
99 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 96 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
100 settings.touch_hit_testing = | 97 settings.touch_hit_testing = |
101 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); | 98 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); |
102 | 99 |
103 int default_tile_width = settings.default_tile_size.width(); | 100 int default_tile_width = settings.default_tile_size.width(); |
104 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 101 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
105 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, | 102 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 widget_->OnSwapBuffersAborted(); | 634 widget_->OnSwapBuffersAborted(); |
638 } | 635 } |
639 | 636 |
640 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 637 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
641 cc::ContextProvider* provider = | 638 cc::ContextProvider* provider = |
642 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 639 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
643 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 640 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
644 } | 641 } |
645 | 642 |
646 } // namespace content | 643 } // namespace content |
OLD | NEW |