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

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

Issue 202863004: Fix "unreachable code" warnings (MSVC warning 4702) in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/compositor_util.cc
===================================================================
--- content/browser/gpu/compositor_util.cc (revision 257821)
+++ content/browser/gpu/compositor_util.cc (working copy)
@@ -194,29 +194,18 @@
// Command line switches take precedence over blacklist.
if (command_line.HasSwitch(switches::kDisableForceCompositingMode) ||
- command_line.HasSwitch(switches::kDisableThreadedCompositing)) {
+ command_line.HasSwitch(switches::kDisableThreadedCompositing))
return false;
- } else if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) {
+ if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
return true;
- }
#if defined(USE_AURA) || defined(OS_MACOSX)
// We always want threaded compositing on Aura and Mac (the fallback is a
// threaded software compositor).
return true;
+#else
+ return false;
#endif
-
- if (!CanDoAcceleratedCompositing() || IsForceCompositingModeBlacklisted())
- return false;
-
-#if defined(OS_WIN)
- // Windows Vista+ has been shipping with TCM enabled at 100% since M24 and
- // The blacklist check above takes care of returning false before this hits
- // on unsupported Win versions.
- return true;
-#endif
-
- return false;
}
bool IsForceCompositingModeEnabled() {
@@ -229,7 +218,7 @@
// Command line switches take precedence over blacklisting.
if (command_line.HasSwitch(switches::kDisableForceCompositingMode))
return false;
- else if (command_line.HasSwitch(switches::kForceCompositingMode))
+ if (command_line.HasSwitch(switches::kForceCompositingMode))
return true;
if (!CanDoAcceleratedCompositing() || IsForceCompositingModeBlacklisted())
@@ -240,9 +229,9 @@
// Mac OSX 10.8+ since M28. The blacklist check above takes care of returning
// false before this hits on unsupported Win/Mac versions.
return true;
+#else
+ return false;
#endif
-
- return false;
}
bool IsDelegatedRendererEnabled() {
« no previous file with comments | « content/browser/dom_storage/dom_storage_database.cc ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698