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

Unified Diff: content/browser/gpu/compositor_util.cc

Issue 22797008: Force delegated renderer on Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix flakiness Created 7 years, 4 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 9270300d2968439ed06686719c548c4cbe29232b..259bb50561947225da8520d40dac3b0d0b551381 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -103,4 +103,23 @@ bool IsForceCompositingModeEnabled() {
trial->group_name() == kGpuCompositingFieldTrialThreadEnabledName);
}
+bool IsDelegatedRendererEnabled() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ bool enabled = false;
+#if defined(USE_AURA)
danakj 2013/08/30 00:10:08 nit: space above this.
piman 2013/08/30 04:01:20 Done.
+ // Default to true on Aura, but allow override via flags.
+ enabled = true;
+#endif
+
+ // Flags override.
+ enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer);
+ enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer);
+
+ // Needs compositing, and thread.
+ enabled &= IsForceCompositingModeEnabled();
danakj 2013/08/30 00:10:08 maybe LOG(ERROR) if one of these causes it to be d
piman 2013/08/30 04:01:20 Done.
+ enabled &= IsThreadedCompositingEnabled();
+
+ return enabled;
+}
+
} // namespace content
« 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