Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 15567005: Plumb pinch virtual viewport flag to CC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised to share setting with Blink also. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 hide_threshold >= 0.f && hide_threshold <= 1.f) 179 hide_threshold >= 0.f && hide_threshold <= 1.f)
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 settings.use_pinch_virtual_viewport =
190 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport);
189 191
190 // These flags should be mirrored by UI versions in ui/compositor/. 192 // These flags should be mirrored by UI versions in ui/compositor/.
191 settings.initial_debug_state.show_debug_borders = 193 settings.initial_debug_state.show_debug_borders =
192 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); 194 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders);
193 settings.initial_debug_state.show_fps_counter = 195 settings.initial_debug_state.show_fps_counter =
194 cmd->HasSwitch(cc::switches::kShowFPSCounter); 196 cmd->HasSwitch(cc::switches::kShowFPSCounter);
195 settings.initial_debug_state.show_paint_rects = 197 settings.initial_debug_state.show_paint_rects =
196 cmd->HasSwitch(switches::kShowPaintRects); 198 cmd->HasSwitch(switches::kShowPaintRects);
197 settings.initial_debug_state.show_platform_layer_tree = 199 settings.initial_debug_state.show_platform_layer_tree =
198 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree); 200 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 566 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
565 } 567 }
566 568
567 scoped_refptr<cc::ContextProvider> 569 scoped_refptr<cc::ContextProvider>
568 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 570 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
569 return RenderThreadImpl::current()-> 571 return RenderThreadImpl::current()->
570 OffscreenContextProviderForCompositorThread(); 572 OffscreenContextProviderForCompositorThread();
571 } 573 }
572 574
573 } // namespace content 575 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698