Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2795703002: ui: Add debug flag to show composited layer borders in ChromeOS UI. (Closed)
Patch Set: nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698