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

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

Issue 12722002: Enable pinch & scrollbars by default for CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 settings.topControlsHideThreshold = hide_threshold; 171 settings.topControlsHideThreshold = hide_threshold;
172 } 172 }
173 173
174 settings.partialSwapEnabled = widget->AllowPartialSwap() && 174 settings.partialSwapEnabled = widget->AllowPartialSwap() &&
175 cmd->HasSwitch(cc::switches::kEnablePartialSwap); 175 cmd->HasSwitch(cc::switches::kEnablePartialSwap);
176 settings.backgroundColorInsteadOfCheckerboard = 176 settings.backgroundColorInsteadOfCheckerboard =
177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
178 settings.showOverdrawInTracing = 178 settings.showOverdrawInTracing =
179 cmd->HasSwitch(cc::switches::kTraceOverdraw); 179 cmd->HasSwitch(cc::switches::kTraceOverdraw);
180 180
181 #if defined(OS_CHROMEOS)
182 settings.usePinchZoomScrollbars =
183 !cmd->HasSwitch(cc::switches::kDisablePinchZoomScrollbars);
184 #elif defined(OS_WIN) || defined(OS_LINUX)
185 settings.usePinchZoomScrollbars =
186 cmd->HasSwitch(cc::switches::kEnablePinchZoomScrollbars);
187 #endif
181 settings.initialDebugState.showFPSCounter = 188 settings.initialDebugState.showFPSCounter =
182 cmd->HasSwitch(switches::kShowFPSCounter); 189 cmd->HasSwitch(switches::kShowFPSCounter);
183 settings.initialDebugState.showPaintRects = 190 settings.initialDebugState.showPaintRects =
184 cmd->HasSwitch(switches::kShowPaintRects); 191 cmd->HasSwitch(switches::kShowPaintRects);
185 settings.initialDebugState.showDebugBorders = 192 settings.initialDebugState.showDebugBorders =
186 cmd->HasSwitch(switches::kShowCompositedLayerBorders); 193 cmd->HasSwitch(switches::kShowCompositedLayerBorders);
187 settings.initialDebugState.showPlatformLayerTree = 194 settings.initialDebugState.showPlatformLayerTree =
188 cmd->HasSwitch(switches::kShowCompositedLayerTree); 195 cmd->HasSwitch(switches::kShowCompositedLayerTree);
189 196
190 settings.initialDebugState.showPropertyChangedRects = 197 settings.initialDebugState.showPropertyChangedRects =
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 510 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
504 } 511 }
505 512
506 scoped_refptr<cc::ContextProvider> 513 scoped_refptr<cc::ContextProvider>
507 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 514 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
508 return RenderThreadImpl::current()-> 515 return RenderThreadImpl::current()->
509 OffscreenContextProviderForCompositorThread(); 516 OffscreenContextProviderForCompositorThread();
510 } 517 }
511 518
512 } // namespace content 519 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698