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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 if (base::StringToDouble(top_threshold_str, &hide_threshold) && | 264 if (base::StringToDouble(top_threshold_str, &hide_threshold) && |
265 hide_threshold >= 0.f && hide_threshold <= 1.f) | 265 hide_threshold >= 0.f && hide_threshold <= 1.f) |
266 settings.top_controls_hide_threshold = hide_threshold; | 266 settings.top_controls_hide_threshold = hide_threshold; |
267 } | 267 } |
268 | 268 |
269 settings.use_pinch_virtual_viewport = | 269 settings.use_pinch_virtual_viewport = |
270 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); | 270 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); |
271 settings.renderer_settings.allow_antialiasing &= | 271 settings.renderer_settings.allow_antialiasing &= |
272 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 272 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
273 settings.single_thread_proxy_scheduler = | 273 settings.single_thread_proxy_scheduler = |
274 !cmd->HasSwitch(switches::kDisableSingleThreadProxyScheduler); | 274 compositor_deps_->UseSingleThreadScheduler(); |
275 | 275 |
276 // These flags should be mirrored by UI versions in ui/compositor/. | 276 // These flags should be mirrored by UI versions in ui/compositor/. |
277 settings.initial_debug_state.show_debug_borders = | 277 settings.initial_debug_state.show_debug_borders = |
278 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); | 278 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); |
279 settings.initial_debug_state.show_fps_counter = | 279 settings.initial_debug_state.show_fps_counter = |
280 cmd->HasSwitch(cc::switches::kShowFPSCounter); | 280 cmd->HasSwitch(cc::switches::kShowFPSCounter); |
281 settings.initial_debug_state.show_layer_animation_bounds_rects = | 281 settings.initial_debug_state.show_layer_animation_bounds_rects = |
282 cmd->HasSwitch(cc::switches::kShowLayerAnimationBounds); | 282 cmd->HasSwitch(cc::switches::kShowLayerAnimationBounds); |
283 settings.initial_debug_state.show_paint_rects = | 283 settings.initial_debug_state.show_paint_rects = |
284 cmd->HasSwitch(switches::kShowPaintRects); | 284 cmd->HasSwitch(switches::kShowPaintRects); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 widget_->OnSwapBuffersAborted(); | 870 widget_->OnSwapBuffersAborted(); |
871 } | 871 } |
872 | 872 |
873 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 873 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
874 cc::ContextProvider* provider = | 874 cc::ContextProvider* provider = |
875 compositor_deps_->GetSharedMainThreadContextProvider(); | 875 compositor_deps_->GetSharedMainThreadContextProvider(); |
876 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 876 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
877 } | 877 } |
878 | 878 |
879 } // namespace content | 879 } // namespace content |
OLD | NEW |