| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 cc::LayerTreeSettings settings; | 171 cc::LayerTreeSettings settings; |
| 172 | 172 |
| 173 // For web contents, layer transforms should scale up the contents of layers | 173 // For web contents, layer transforms should scale up the contents of layers |
| 174 // to keep content always crisp when possible. | 174 // to keep content always crisp when possible. |
| 175 settings.layer_transforms_should_scale_layer_contents = true; | 175 settings.layer_transforms_should_scale_layer_contents = true; |
| 176 | 176 |
| 177 settings.throttle_frame_production = | 177 settings.throttle_frame_production = |
| 178 !cmd->HasSwitch(switches::kDisableGpuVsync); | 178 !cmd->HasSwitch(switches::kDisableGpuVsync); |
| 179 settings.use_external_begin_frame_source = | 179 settings.use_external_begin_frame_source = |
| 180 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 180 cmd->HasSwitch(cc::switches::kEnableBeginFrameScheduling); |
| 181 settings.main_frame_before_activation_enabled = | 181 settings.main_frame_before_activation_enabled = |
| 182 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 182 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 183 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 183 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 184 settings.report_overscroll_only_for_scrollable_axes = true; | 184 settings.report_overscroll_only_for_scrollable_axes = true; |
| 185 settings.accelerated_animation_enabled = | 185 settings.accelerated_animation_enabled = |
| 186 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 186 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 187 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); | 187 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); |
| 188 | 188 |
| 189 settings.default_tile_size = CalculateDefaultTileSize(); | 189 settings.default_tile_size = CalculateDefaultTileSize(); |
| 190 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 190 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 widget_->OnSwapBuffersAborted(); | 891 widget_->OnSwapBuffersAborted(); |
| 892 } | 892 } |
| 893 | 893 |
| 894 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 894 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 895 cc::ContextProvider* provider = | 895 cc::ContextProvider* provider = |
| 896 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 896 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 897 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 897 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace content | 900 } // namespace content |
| OLD | NEW |