| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // to keep content always crisp when possible. | 171 // to keep content always crisp when possible. |
| 172 settings.layer_transforms_should_scale_layer_contents = true; | 172 settings.layer_transforms_should_scale_layer_contents = true; |
| 173 | 173 |
| 174 settings.throttle_frame_production = | 174 settings.throttle_frame_production = |
| 175 !cmd->HasSwitch(switches::kDisableGpuVsync); | 175 !cmd->HasSwitch(switches::kDisableGpuVsync); |
| 176 settings.begin_frame_scheduling_enabled = | 176 settings.begin_frame_scheduling_enabled = |
| 177 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 177 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); |
| 178 settings.main_frame_before_activation_enabled = | 178 settings.main_frame_before_activation_enabled = |
| 179 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 179 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 180 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 180 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 181 settings.main_frame_before_draw_enabled = | |
| 182 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw); | |
| 183 settings.report_overscroll_only_for_scrollable_axes = true; | 181 settings.report_overscroll_only_for_scrollable_axes = true; |
| 184 settings.accelerated_animation_enabled = | 182 settings.accelerated_animation_enabled = |
| 185 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 183 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 186 | 184 |
| 187 settings.default_tile_size = CalculateDefaultTileSize(); | 185 settings.default_tile_size = CalculateDefaultTileSize(); |
| 188 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 186 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
| 189 int tile_width = 0; | 187 int tile_width = 0; |
| 190 GetSwitchValueAsInt(*cmd, | 188 GetSwitchValueAsInt(*cmd, |
| 191 switches::kDefaultTileWidth, | 189 switches::kDefaultTileWidth, |
| 192 1, | 190 1, |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 widget_->OnSwapBuffersAborted(); | 846 widget_->OnSwapBuffersAborted(); |
| 849 } | 847 } |
| 850 | 848 |
| 851 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 849 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 852 cc::ContextProvider* provider = | 850 cc::ContextProvider* provider = |
| 853 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 851 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 854 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 852 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 855 } | 853 } |
| 856 | 854 |
| 857 } // namespace content | 855 } // namespace content |
| OLD | NEW |