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

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: Rebased for landing Created 7 years, 6 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
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | webkit/glue/webpreferences.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 hide_threshold >= 0.f && hide_threshold <= 1.f) 183 hide_threshold >= 0.f && hide_threshold <= 1.f)
184 settings.top_controls_hide_threshold = hide_threshold; 184 settings.top_controls_hide_threshold = hide_threshold;
185 } 185 }
186 186
187 settings.partial_swap_enabled = widget->AllowPartialSwap() && 187 settings.partial_swap_enabled = widget->AllowPartialSwap() &&
188 cmd->HasSwitch(cc::switches::kEnablePartialSwap); 188 cmd->HasSwitch(cc::switches::kEnablePartialSwap);
189 settings.background_color_instead_of_checkerboard = 189 settings.background_color_instead_of_checkerboard =
190 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 190 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
191 settings.show_overdraw_in_tracing = 191 settings.show_overdraw_in_tracing =
192 cmd->HasSwitch(cc::switches::kTraceOverdraw); 192 cmd->HasSwitch(cc::switches::kTraceOverdraw);
193 settings.use_pinch_virtual_viewport =
194 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport);
193 195
194 // These flags should be mirrored by UI versions in ui/compositor/. 196 // These flags should be mirrored by UI versions in ui/compositor/.
195 settings.initial_debug_state.show_debug_borders = 197 settings.initial_debug_state.show_debug_borders =
196 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders); 198 cmd->HasSwitch(cc::switches::kShowCompositedLayerBorders);
197 settings.initial_debug_state.show_fps_counter = 199 settings.initial_debug_state.show_fps_counter =
198 cmd->HasSwitch(cc::switches::kShowFPSCounter); 200 cmd->HasSwitch(cc::switches::kShowFPSCounter);
199 settings.initial_debug_state.show_paint_rects = 201 settings.initial_debug_state.show_paint_rects =
200 cmd->HasSwitch(switches::kShowPaintRects); 202 cmd->HasSwitch(switches::kShowPaintRects);
201 settings.initial_debug_state.show_platform_layer_tree = 203 settings.initial_debug_state.show_platform_layer_tree =
202 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree); 204 cmd->HasSwitch(cc::switches::kShowCompositedLayerTree);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 573 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
572 } 574 }
573 575
574 scoped_refptr<cc::ContextProvider> 576 scoped_refptr<cc::ContextProvider>
575 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 577 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
576 return RenderThreadImpl::current()-> 578 return RenderThreadImpl::current()->
577 OffscreenContextProviderForCompositorThread(); 579 OffscreenContextProviderForCompositorThread();
578 } 580 }
579 581
580 } // namespace content 582 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | webkit/glue/webpreferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698