| 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 <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 settings.initial_debug_state.show_paint_rects = | 288 settings.initial_debug_state.show_paint_rects = |
| 289 cmd->HasSwitch(switches::kShowPaintRects); | 289 cmd->HasSwitch(switches::kShowPaintRects); |
| 290 settings.initial_debug_state.show_property_changed_rects = | 290 settings.initial_debug_state.show_property_changed_rects = |
| 291 cmd->HasSwitch(cc::switches::kShowPropertyChangedRects); | 291 cmd->HasSwitch(cc::switches::kShowPropertyChangedRects); |
| 292 settings.initial_debug_state.show_surface_damage_rects = | 292 settings.initial_debug_state.show_surface_damage_rects = |
| 293 cmd->HasSwitch(cc::switches::kShowSurfaceDamageRects); | 293 cmd->HasSwitch(cc::switches::kShowSurfaceDamageRects); |
| 294 settings.initial_debug_state.show_screen_space_rects = | 294 settings.initial_debug_state.show_screen_space_rects = |
| 295 cmd->HasSwitch(cc::switches::kShowScreenSpaceRects); | 295 cmd->HasSwitch(cc::switches::kShowScreenSpaceRects); |
| 296 settings.initial_debug_state.show_replica_screen_space_rects = | 296 settings.initial_debug_state.show_replica_screen_space_rects = |
| 297 cmd->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); | 297 cmd->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); |
| 298 settings.initial_debug_state.show_occluding_rects = | |
| 299 cmd->HasSwitch(cc::switches::kShowOccludingRects); | |
| 300 settings.initial_debug_state.show_non_occluding_rects = | |
| 301 cmd->HasSwitch(cc::switches::kShowNonOccludingRects); | |
| 302 | 298 |
| 303 settings.initial_debug_state.SetRecordRenderingStats( | 299 settings.initial_debug_state.SetRecordRenderingStats( |
| 304 cmd->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 300 cmd->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
| 305 | 301 |
| 306 if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) { | 302 if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) { |
| 307 const int kMinSlowDownScaleFactor = 0; | 303 const int kMinSlowDownScaleFactor = 0; |
| 308 const int kMaxSlowDownScaleFactor = INT_MAX; | 304 const int kMaxSlowDownScaleFactor = INT_MAX; |
| 309 GetSwitchValueAsInt( | 305 GetSwitchValueAsInt( |
| 310 *cmd, | 306 *cmd, |
| 311 cc::switches::kSlowDownRasterScaleFactor, | 307 cc::switches::kSlowDownRasterScaleFactor, |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 widget_->OnSwapBuffersAborted(); | 879 widget_->OnSwapBuffersAborted(); |
| 884 } | 880 } |
| 885 | 881 |
| 886 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 882 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 887 cc::ContextProvider* provider = | 883 cc::ContextProvider* provider = |
| 888 compositor_deps_->GetSharedMainThreadContextProvider(); | 884 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 889 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 885 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 890 } | 886 } |
| 891 | 887 |
| 892 } // namespace content | 888 } // namespace content |
| OLD | NEW |