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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <limits> | 10 #include <limits> |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 settings.renderer_settings.allow_antialiasing &= | 345 settings.renderer_settings.allow_antialiasing &= |
346 !cmd.HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 346 !cmd.HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
347 // The means the renderer compositor has 2 possible modes: | 347 // The means the renderer compositor has 2 possible modes: |
348 // - Threaded compositing with a scheduler. | 348 // - Threaded compositing with a scheduler. |
349 // - Single threaded compositing without a scheduler (for layout tests only). | 349 // - Single threaded compositing without a scheduler (for layout tests only). |
350 // Using the scheduler in layout tests introduces additional composite steps | 350 // Using the scheduler in layout tests introduces additional composite steps |
351 // that create flakiness. | 351 // that create flakiness. |
352 settings.single_thread_proxy_scheduler = false; | 352 settings.single_thread_proxy_scheduler = false; |
353 | 353 |
354 // These flags should be mirrored by UI versions in ui/compositor/. | 354 // These flags should be mirrored by UI versions in ui/compositor/. |
355 settings.initial_debug_state.show_debug_borders = | 355 if (cmd.HasSwitch(cc::switches::kShowCompositedLayerBorders)) |
356 cmd.HasSwitch(cc::switches::kShowCompositedLayerBorders); | 356 settings.initial_debug_state.show_debug_borders.set(); |
357 settings.initial_debug_state.show_layer_animation_bounds_rects = | 357 settings.initial_debug_state.show_layer_animation_bounds_rects = |
358 cmd.HasSwitch(cc::switches::kShowLayerAnimationBounds); | 358 cmd.HasSwitch(cc::switches::kShowLayerAnimationBounds); |
359 settings.initial_debug_state.show_paint_rects = | 359 settings.initial_debug_state.show_paint_rects = |
360 cmd.HasSwitch(switches::kShowPaintRects); | 360 cmd.HasSwitch(switches::kShowPaintRects); |
361 settings.initial_debug_state.show_property_changed_rects = | 361 settings.initial_debug_state.show_property_changed_rects = |
362 cmd.HasSwitch(cc::switches::kShowPropertyChangedRects); | 362 cmd.HasSwitch(cc::switches::kShowPropertyChangedRects); |
363 settings.initial_debug_state.show_surface_damage_rects = | 363 settings.initial_debug_state.show_surface_damage_rects = |
364 cmd.HasSwitch(cc::switches::kShowSurfaceDamageRects); | 364 cmd.HasSwitch(cc::switches::kShowSurfaceDamageRects); |
365 settings.initial_debug_state.show_screen_space_rects = | 365 settings.initial_debug_state.show_screen_space_rects = |
366 cmd.HasSwitch(cc::switches::kShowScreenSpaceRects); | 366 cmd.HasSwitch(cc::switches::kShowScreenSpaceRects); |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { | 1145 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { |
1146 layer_tree_host_->SetContentSourceId(id); | 1146 layer_tree_host_->SetContentSourceId(id); |
1147 } | 1147 } |
1148 | 1148 |
1149 void RenderWidgetCompositor::SetLocalSurfaceId( | 1149 void RenderWidgetCompositor::SetLocalSurfaceId( |
1150 const cc::LocalSurfaceId& local_surface_id) { | 1150 const cc::LocalSurfaceId& local_surface_id) { |
1151 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1151 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
1152 } | 1152 } |
1153 | 1153 |
1154 } // namespace content | 1154 } // namespace content |
OLD | NEW |