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

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

Issue 665963002: Enable virtual viewport on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enabling only on Android Created 6 years, 1 month 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
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | no next file » | 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) 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 "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 bool IsPinchVirtualViewportEnabled() { 166 bool IsPinchVirtualViewportEnabled() {
167 const base::CommandLine& command_line = 167 const base::CommandLine& command_line =
168 *base::CommandLine::ForCurrentProcess(); 168 *base::CommandLine::ForCurrentProcess();
169 169
170 // Command line switches take precedence over platform default. 170 // Command line switches take precedence over platform default.
171 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport)) 171 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport))
172 return false; 172 return false;
173 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) 173 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport))
174 return true; 174 return true;
175 175
176 #if defined(OS_CHROMEOS) 176 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
177 return true; 177 return true;
178 #else 178 #else
179 return false; 179 return false;
180 #endif 180 #endif
181 } 181 }
182 182
183 bool IsDelegatedRendererEnabled() { 183 bool IsDelegatedRendererEnabled() {
184 const base::CommandLine& command_line = 184 const base::CommandLine& command_line =
185 *base::CommandLine::ForCurrentProcess(); 185 *base::CommandLine::ForCurrentProcess();
186 bool enabled = false; 186 bool enabled = false;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 return problem_list; 371 return problem_list;
372 } 372 }
373 373
374 base::Value* GetDriverBugWorkarounds() { 374 base::Value* GetDriverBugWorkarounds() {
375 base::ListValue* workaround_list = new base::ListValue(); 375 base::ListValue* workaround_list = new base::ListValue();
376 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); 376 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list);
377 return workaround_list; 377 return workaround_list;
378 } 378 }
379 379
380 } // namespace content 380 } // namespace content
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698