| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 settings.top_controls_hide_threshold = hide_threshold; | 308 settings.top_controls_hide_threshold = hide_threshold; |
| 309 } | 309 } |
| 310 | 310 |
| 311 settings.use_pinch_virtual_viewport = | 311 settings.use_pinch_virtual_viewport = |
| 312 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); | 312 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); |
| 313 settings.verify_property_trees = | 313 settings.verify_property_trees = |
| 314 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification) && | 314 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification) && |
| 315 settings.impl_side_painting; | 315 settings.impl_side_painting; |
| 316 settings.renderer_settings.allow_antialiasing &= | 316 settings.renderer_settings.allow_antialiasing &= |
| 317 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 317 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
| 318 settings.single_thread_proxy_scheduler = | 318 // The means the renderer compositor has 2 possible modes: |
| 319 compositor_deps_->UseSingleThreadScheduler(); | 319 // - Threaded compositing with a scheduler. |
| 320 // - Single threaded compositing without a scheduler (for layout tests only). |
| 321 // Using the scheduler in layout tests introduces additional composite steps |
| 322 // that create flakiness. |
| 323 settings.single_thread_proxy_scheduler = false; |
| 320 | 324 |
| 321 // These flags should be mirrored by UI versions in ui/compositor/. | 325 // These flags should be mirrored by UI versions in ui/compositor/. |
| 322 settings.initial_debug_state.show_debug_borders = | 326 settings.initial_debug_state.show_debug_borders = |
| 323 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); | 327 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); |
| 324 settings.initial_debug_state.show_fps_counter = | 328 settings.initial_debug_state.show_fps_counter = |
| 325 cmd->HasSwitch(cc::switches::kShowFPSCounter); | 329 cmd->HasSwitch(cc::switches::kShowFPSCounter); |
| 326 settings.initial_debug_state.show_layer_animation_bounds_rects = | 330 settings.initial_debug_state.show_layer_animation_bounds_rects = |
| 327 cmd->HasSwitch(cc::switches::kShowLayerAnimationBounds); | 331 cmd->HasSwitch(cc::switches::kShowLayerAnimationBounds); |
| 328 settings.initial_debug_state.show_paint_rects = | 332 settings.initial_debug_state.show_paint_rects = |
| 329 cmd->HasSwitch(switches::kShowPaintRects); | 333 cmd->HasSwitch(switches::kShowPaintRects); |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 return; | 968 return; |
| 965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 969 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 966 } | 970 } |
| 967 | 971 |
| 968 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 972 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 969 uint32_t surface_id_namespace) { | 973 uint32_t surface_id_namespace) { |
| 970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 974 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 971 } | 975 } |
| 972 | 976 |
| 973 } // namespace content | 977 } // namespace content |
| OLD | NEW |