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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 settings.top_controls_hide_threshold = hide_threshold; | 180 settings.top_controls_hide_threshold = hide_threshold; |
181 } | 181 } |
182 | 182 |
183 settings.partial_swap_enabled = widget->AllowPartialSwap() && | 183 settings.partial_swap_enabled = widget->AllowPartialSwap() && |
184 cmd->HasSwitch(cc::switches::kEnablePartialSwap); | 184 cmd->HasSwitch(cc::switches::kEnablePartialSwap); |
185 settings.background_color_instead_of_checkerboard = | 185 settings.background_color_instead_of_checkerboard = |
186 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); | 186 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); |
187 settings.show_overdraw_in_tracing = | 187 settings.show_overdraw_in_tracing = |
188 cmd->HasSwitch(cc::switches::kTraceOverdraw); | 188 cmd->HasSwitch(cc::switches::kTraceOverdraw); |
189 | 189 |
190 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) | |
191 settings.use_pinch_zoom_scrollbars = | |
192 cmd->HasSwitch(cc::switches::kEnablePinchZoomScrollbars); | |
193 #endif | |
194 | |
195 // These flags should be mirrored by UI versions in ui/compositor/. | 190 // These flags should be mirrored by UI versions in ui/compositor/. |
196 settings.initial_debug_state.show_debug_borders = | 191 settings.initial_debug_state.show_debug_borders = |
197 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); | 192 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); |
198 settings.initial_debug_state.show_fps_counter = | 193 settings.initial_debug_state.show_fps_counter = |
199 cmd->HasSwitch(cc::switches::kShowFPSCounter); | 194 cmd->HasSwitch(cc::switches::kShowFPSCounter); |
200 settings.initial_debug_state.show_paint_rects = | 195 settings.initial_debug_state.show_paint_rects = |
201 cmd->HasSwitch(switches::kShowPaintRects); | 196 cmd->HasSwitch(switches::kShowPaintRects); |
202 settings.initial_debug_state.show_platform_layer_tree = | 197 settings.initial_debug_state.show_platform_layer_tree = |
203 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree); | 198 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree); |
204 settings.initial_debug_state.show_property_changed_rects = | 199 settings.initial_debug_state.show_property_changed_rects = |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 569 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
575 } | 570 } |
576 | 571 |
577 scoped_refptr<cc::ContextProvider> | 572 scoped_refptr<cc::ContextProvider> |
578 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 573 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
579 return RenderThreadImpl::current()-> | 574 return RenderThreadImpl::current()-> |
580 OffscreenContextProviderForCompositorThread(); | 575 OffscreenContextProviderForCompositorThread(); |
581 } | 576 } |
582 | 577 |
583 } // namespace content | 578 } // namespace content |
OLD | NEW |