Chromium Code Reviews| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 settings.background_color_instead_of_checkerboard = | 174 settings.background_color_instead_of_checkerboard = |
| 175 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); | 175 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); |
| 176 settings.show_overdraw_in_tracing = | 176 settings.show_overdraw_in_tracing = |
| 177 cmd->HasSwitch(cc::switches::kTraceOverdraw); | 177 cmd->HasSwitch(cc::switches::kTraceOverdraw); |
| 178 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled(); | 178 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled(); |
| 179 settings.use_pinch_virtual_viewport = | 179 settings.use_pinch_virtual_viewport = |
| 180 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); | 180 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); |
| 181 settings.allow_antialiasing &= | 181 settings.allow_antialiasing &= |
| 182 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 182 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
| 183 | 183 |
| 184 // These flags should be mirrored by UI versions in ui/compositor/. | 184 // These flags should be mirrored by UI versions in ui/compositor/. |
|
Ken Russell (switch to Gerrit)
2013/12/09 19:19:14
Nit: I don't see any changes to ui/compositor/ in
avallee
2013/12/09 21:30:26
Our bounds are in window space for now. This means
danakj
2013/12/09 21:43:52
What this comment means is these flags should be p
avallee
2013/12/09 21:48:05
Done.
| |
| 185 settings.initial_debug_state.show_layer_animation_bounds_rects = | |
| 186 cmd->HasSwitch(cc::switches::kShowLayerAnimationBounds); | |
| 185 settings.initial_debug_state.show_debug_borders = | 187 settings.initial_debug_state.show_debug_borders = |
| 186 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); | 188 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); |
| 187 settings.initial_debug_state.show_fps_counter = | 189 settings.initial_debug_state.show_fps_counter = |
| 188 cmd->HasSwitch(cc::switches::kShowFPSCounter); | 190 cmd->HasSwitch(cc::switches::kShowFPSCounter); |
| 189 settings.initial_debug_state.show_paint_rects = | 191 settings.initial_debug_state.show_paint_rects = |
| 190 cmd->HasSwitch(switches::kShowPaintRects); | 192 cmd->HasSwitch(switches::kShowPaintRects); |
| 191 settings.initial_debug_state.show_property_changed_rects = | 193 settings.initial_debug_state.show_property_changed_rects = |
| 192 cmd->HasSwitch(cc::switches::kShowPropertyChangedRects); | 194 cmd->HasSwitch(cc::switches::kShowPropertyChangedRects); |
| 193 settings.initial_debug_state.show_surface_damage_rects = | 195 settings.initial_debug_state.show_surface_damage_rects = |
| 194 cmd->HasSwitch(cc::switches::kShowSurfaceDamageRects); | 196 cmd->HasSwitch(cc::switches::kShowSurfaceDamageRects); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 635 widget_->OnSwapBuffersAborted(); | 637 widget_->OnSwapBuffersAborted(); |
| 636 } | 638 } |
| 637 | 639 |
| 638 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 640 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 639 cc::ContextProvider* provider = | 641 cc::ContextProvider* provider = |
| 640 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 642 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 641 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); | 643 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); |
| 642 } | 644 } |
| 643 | 645 |
| 644 } // namespace content | 646 } // namespace content |
| OLD | NEW |