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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index a9c3318c86b611e63b712756df9046a5c960d565..673e3cea098661bd358af49d6ab9910fbd1c9351 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -156,6 +156,22 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
} // namespace
+bool IsPinchVirtualViewportEnabled() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ // Command line switches take precedence over platform default.
+ if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport))
+ return false;
+ if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport))
+ return true;
+
+#if defined(OS_CHROMEOS)
+ return true;
+#else
+ return false;
+#endif
+}
+
bool IsThreadedCompositingEnabled() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
« 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