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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 settings.initial_debug_state.show_screen_space_rects = | 198 settings.initial_debug_state.show_screen_space_rects = |
199 cmd->HasSwitch(cc::switches::kShowScreenSpaceRects); | 199 cmd->HasSwitch(cc::switches::kShowScreenSpaceRects); |
200 settings.initial_debug_state.show_replica_screen_space_rects = | 200 settings.initial_debug_state.show_replica_screen_space_rects = |
201 cmd->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); | 201 cmd->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); |
202 settings.initial_debug_state.show_occluding_rects = | 202 settings.initial_debug_state.show_occluding_rects = |
203 cmd->HasSwitch(cc::switches::kShowOccludingRects); | 203 cmd->HasSwitch(cc::switches::kShowOccludingRects); |
204 settings.initial_debug_state.show_non_occluding_rects = | 204 settings.initial_debug_state.show_non_occluding_rects = |
205 cmd->HasSwitch(cc::switches::kShowNonOccludingRects); | 205 cmd->HasSwitch(cc::switches::kShowNonOccludingRects); |
206 | 206 |
207 settings.initial_debug_state.SetRecordRenderingStats( | 207 settings.initial_debug_state.SetRecordRenderingStats( |
208 cmd->HasSwitch(switches::kEnableGpuBenchmarking)); | 208 cmd->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
209 | 209 |
210 if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) { | 210 if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) { |
211 const int kMinSlowDownScaleFactor = 0; | 211 const int kMinSlowDownScaleFactor = 0; |
212 const int kMaxSlowDownScaleFactor = INT_MAX; | 212 const int kMaxSlowDownScaleFactor = INT_MAX; |
213 GetSwitchValueAsInt( | 213 GetSwitchValueAsInt( |
214 *cmd, | 214 *cmd, |
215 cc::switches::kSlowDownRasterScaleFactor, | 215 cc::switches::kSlowDownRasterScaleFactor, |
216 kMinSlowDownScaleFactor, | 216 kMinSlowDownScaleFactor, |
217 kMaxSlowDownScaleFactor, | 217 kMaxSlowDownScaleFactor, |
218 &settings.initial_debug_state.slow_down_raster_scale_factor); | 218 &settings.initial_debug_state.slow_down_raster_scale_factor); |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 widget_->OnSwapBuffersAborted(); | 624 widget_->OnSwapBuffersAborted(); |
625 } | 625 } |
626 | 626 |
627 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 627 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
628 cc::ContextProvider* provider = | 628 cc::ContextProvider* provider = |
629 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 629 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
630 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 630 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
631 } | 631 } |
632 | 632 |
633 } // namespace content | 633 } // namespace content |
OLD | NEW |