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

Side by Side Diff: content/browser/gpu/compositor_util.cc

Issue 257903002: Fix for pinch virtual viewport flag wasn't fully enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed to AppendCompositorCommandLineFlags Created 6 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/gpu/compositor_util.h" 5 #include "content/browser/gpu/compositor_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 true 149 true
150 } 150 }
151 }; 151 };
152 DCHECK(index < arraysize(kGpuFeatureInfo)); 152 DCHECK(index < arraysize(kGpuFeatureInfo));
153 *eof = (index == arraysize(kGpuFeatureInfo) - 1); 153 *eof = (index == arraysize(kGpuFeatureInfo) - 1);
154 return kGpuFeatureInfo[index]; 154 return kGpuFeatureInfo[index];
155 } 155 }
156 156
157 } // namespace 157 } // namespace
158 158
159 bool IsPinchVirtualViewportEnabled() {
160 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
161
162 // Command line switches take precedence over platform default.
163 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport))
164 return false;
165 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport))
166 return true;
167
168 #if defined(OS_CHROMEOS)
169 return true;
170 #else
171 return false;
172 #endif
173 }
174
159 bool IsThreadedCompositingEnabled() { 175 bool IsThreadedCompositingEnabled() {
160 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 176 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
161 177
162 // Command line switches take precedence over blacklist. 178 // Command line switches take precedence over blacklist.
163 if (command_line.HasSwitch(switches::kDisableThreadedCompositing)) 179 if (command_line.HasSwitch(switches::kDisableThreadedCompositing))
164 return false; 180 return false;
165 if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) 181 if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
166 return true; 182 return true;
167 183
168 #if defined(USE_AURA) || defined(OS_MACOSX) 184 #if defined(USE_AURA) || defined(OS_MACOSX)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 return problem_list; 358 return problem_list;
343 } 359 }
344 360
345 base::Value* GetDriverBugWorkarounds() { 361 base::Value* GetDriverBugWorkarounds() {
346 base::ListValue* workaround_list = new base::ListValue(); 362 base::ListValue* workaround_list = new base::ListValue();
347 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); 363 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list);
348 return workaround_list; 364 return workaround_list;
349 } 365 }
350 366
351 } // namespace content 367 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698