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