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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 settings.top_controls_hide_threshold = hide_threshold; | 175 settings.top_controls_hide_threshold = hide_threshold; |
176 } | 176 } |
177 | 177 |
178 settings.partial_swap_enabled = widget->AllowPartialSwap() && | 178 settings.partial_swap_enabled = widget->AllowPartialSwap() && |
179 cmd->HasSwitch(cc::switches::kEnablePartialSwap); | 179 cmd->HasSwitch(cc::switches::kEnablePartialSwap); |
180 settings.background_color_instead_of_checkerboard = | 180 settings.background_color_instead_of_checkerboard = |
181 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); | 181 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); |
182 settings.show_overdraw_in_tracing = | 182 settings.show_overdraw_in_tracing = |
183 cmd->HasSwitch(cc::switches::kTraceOverdraw); | 183 cmd->HasSwitch(cc::switches::kTraceOverdraw); |
184 | 184 |
| 185 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) |
| 186 settings.use_pinch_zoom_scrollbars = |
| 187 cmd->HasSwitch(cc::switches::kEnablePinchZoomScrollbars); |
| 188 #endif |
| 189 |
185 // These flags should be mirrored by UI versions in ui/compositor/. | 190 // These flags should be mirrored by UI versions in ui/compositor/. |
186 settings.initial_debug_state.show_debug_borders = | 191 settings.initial_debug_state.show_debug_borders = |
187 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); | 192 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); |
188 settings.initial_debug_state.show_fps_counter = | 193 settings.initial_debug_state.show_fps_counter = |
189 cmd->HasSwitch(cc::switches::kShowFPSCounter); | 194 cmd->HasSwitch(cc::switches::kShowFPSCounter); |
190 settings.initial_debug_state.show_paint_rects = | 195 settings.initial_debug_state.show_paint_rects = |
191 cmd->HasSwitch(switches::kShowPaintRects); | 196 cmd->HasSwitch(switches::kShowPaintRects); |
192 settings.initial_debug_state.show_platform_layer_tree = | 197 settings.initial_debug_state.show_platform_layer_tree = |
193 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree); | 198 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree); |
194 settings.initial_debug_state.show_property_changed_rects = | 199 settings.initial_debug_state.show_property_changed_rects = |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 557 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
553 } | 558 } |
554 | 559 |
555 scoped_refptr<cc::ContextProvider> | 560 scoped_refptr<cc::ContextProvider> |
556 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
557 return RenderThreadImpl::current()-> | 562 return RenderThreadImpl::current()-> |
558 OffscreenContextProviderForCompositorThread(); | 563 OffscreenContextProviderForCompositorThread(); |
559 } | 564 } |
560 | 565 |
561 } // namespace content | 566 } // namespace content |
OLD | NEW |