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

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

Issue 92853002: Support for drawing a debug border around animated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address vollick's comments. Created 7 years 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) 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 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 193 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
194 settings.show_overdraw_in_tracing = 194 settings.show_overdraw_in_tracing =
195 cmd->HasSwitch(cc::switches::kTraceOverdraw); 195 cmd->HasSwitch(cc::switches::kTraceOverdraw);
196 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled(); 196 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled();
197 settings.use_pinch_virtual_viewport = 197 settings.use_pinch_virtual_viewport =
198 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); 198 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport);
199 settings.allow_antialiasing &= 199 settings.allow_antialiasing &=
200 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); 200 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing);
201 201
202 // These flags should be mirrored by UI versions in ui/compositor/. 202 // These flags should be mirrored by UI versions in ui/compositor/.
203 settings.initial_debug_state.show_layer_animation_bounds_rects =
204 cmd->HasSwitch(cc::switches::kShowLayerAnimationBounds);
203 settings.initial_debug_state.show_debug_borders = 205 settings.initial_debug_state.show_debug_borders =
204 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); 206 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders);
205 settings.initial_debug_state.show_fps_counter = 207 settings.initial_debug_state.show_fps_counter =
206 cmd->HasSwitch(cc::switches::kShowFPSCounter); 208 cmd->HasSwitch(cc::switches::kShowFPSCounter);
207 settings.initial_debug_state.show_paint_rects = 209 settings.initial_debug_state.show_paint_rects =
208 cmd->HasSwitch(switches::kShowPaintRects); 210 cmd->HasSwitch(switches::kShowPaintRects);
209 settings.initial_debug_state.show_property_changed_rects = 211 settings.initial_debug_state.show_property_changed_rects =
210 cmd->HasSwitch(cc::switches::kShowPropertyChangedRects); 212 cmd->HasSwitch(cc::switches::kShowPropertyChangedRects);
211 settings.initial_debug_state.show_surface_damage_rects = 213 settings.initial_debug_state.show_surface_damage_rects =
212 cmd->HasSwitch(cc::switches::kShowSurfaceDamageRects); 214 cmd->HasSwitch(cc::switches::kShowSurfaceDamageRects);
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 widget_->OnSwapBuffersAborted(); 662 widget_->OnSwapBuffersAborted();
661 } 663 }
662 664
663 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 665 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
664 cc::ContextProvider* provider = 666 cc::ContextProvider* provider =
665 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 667 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
666 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); 668 provider->Context3d()->rateLimitOffscreenContextCHROMIUM();
667 } 669 }
668 670
669 } // namespace content 671 } // namespace content
OLDNEW
« cc/layers/layer_impl.h ('K') | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698