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

Side by Side Diff: ui/compositor/compositor.cc

Issue 2612023002: cc: Implement overdraw feedback debugging feature. (Closed)
Patch Set: fix typo in comment Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 settings.renderer_settings.partial_swap_enabled = 134 settings.renderer_settings.partial_swap_enabled =
135 !command_line->HasSwitch(switches::kUIDisablePartialSwap); 135 !command_line->HasSwitch(switches::kUIDisablePartialSwap);
136 #if defined(OS_WIN) 136 #if defined(OS_WIN)
137 settings.renderer_settings.finish_rendering_on_resize = true; 137 settings.renderer_settings.finish_rendering_on_resize = true;
138 #elif defined(OS_MACOSX) 138 #elif defined(OS_MACOSX)
139 settings.renderer_settings.release_overlay_resources_after_gpu_query = true; 139 settings.renderer_settings.release_overlay_resources_after_gpu_query = true;
140 #endif 140 #endif
141 settings.renderer_settings.gl_composited_texture_quad_border = 141 settings.renderer_settings.gl_composited_texture_quad_border =
142 command_line->HasSwitch(cc::switches::kGlCompositedTextureQuadBorder); 142 command_line->HasSwitch(cc::switches::kGlCompositedTextureQuadBorder);
143 settings.renderer_settings.show_overdraw_feedback =
144 command_line->HasSwitch(cc::switches::kShowOverdrawFeedback);
143 145
144 // These flags should be mirrored by renderer versions in content/renderer/. 146 // These flags should be mirrored by renderer versions in content/renderer/.
145 settings.initial_debug_state.show_debug_borders = 147 settings.initial_debug_state.show_debug_borders =
146 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 148 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
147 settings.initial_debug_state.show_fps_counter = 149 settings.initial_debug_state.show_fps_counter =
148 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 150 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
149 settings.initial_debug_state.show_layer_animation_bounds_rects = 151 settings.initial_debug_state.show_layer_animation_bounds_rects =
150 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); 152 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds);
151 settings.initial_debug_state.show_paint_rects = 153 settings.initial_debug_state.show_paint_rects =
152 command_line->HasSwitch(switches::kUIShowPaintRects); 154 command_line->HasSwitch(switches::kUIShowPaintRects);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 for (auto& observer : observer_list_) 572 for (auto& observer : observer_list_)
571 observer.OnCompositingLockStateChanged(this); 573 observer.OnCompositingLockStateChanged(this);
572 } 574 }
573 575
574 void Compositor::CancelCompositorLock() { 576 void Compositor::CancelCompositorLock() {
575 if (compositor_lock_) 577 if (compositor_lock_)
576 compositor_lock_->CancelLock(); 578 compositor_lock_->CancelLock();
577 } 579 }
578 580
579 } // namespace ui 581 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698