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

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

Issue 27197009: Enforce FCM settings via the blacklist rather than in-code version checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | gpu/config/software_rendering_list_json.cc » ('j') | 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/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/browser/gpu_data_manager.h" 10 #include "content/public/browser/gpu_data_manager.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // Command line switches take precedence over blacklisting and field trials. 85 // Command line switches take precedence over blacklisting and field trials.
86 if (command_line.HasSwitch(switches::kDisableForceCompositingMode)) 86 if (command_line.HasSwitch(switches::kDisableForceCompositingMode))
87 return false; 87 return false;
88 else if (command_line.HasSwitch(switches::kForceCompositingMode)) 88 else if (command_line.HasSwitch(switches::kForceCompositingMode))
89 return true; 89 return true;
90 90
91 if (!CanDoAcceleratedCompositing() || IsForceCompositingModeBlacklisted()) 91 if (!CanDoAcceleratedCompositing() || IsForceCompositingModeBlacklisted())
92 return false; 92 return false;
93 93
94 // Hardcode some platforms to use FCM, this has to be done here instead of via 94 // TODO(gab): Do the same thing for TCM above once this is stable.
95 // the field trial so that this configuration is used on try bots as well. 95 #if defined(OS_MACOSX) || defined(OS_WIN)
96 // TODO(gab): Do the same thing in IsThreadedCompositingEnabled() once this is 96 // Windows Vista+ has been shipping with FCM enabled at 100% since M24 and
97 // stable. 97 // Mac OSX 10.8+ since M28. The blacklist check above takes care of returning
98 // TODO(gab): Use the GPU blacklist instead of hardcoding OS versions here 98 // false before this hits on unsupported Win/Mac versions.
99 // https://codereview.chromium.org/23534006. 99 return true;
100 #if defined(OS_MACOSX)
101 // Mac OSX 10.8+ has been shipping with FCM enabled at 100% since M28.
102 return base::mac::IsOSMountainLionOrLater();
103 #elif defined(OS_WIN)
104 // Windows Vista+ has been shipping with FCM enabled at 100% since M24.
105 return base::win::GetVersion() >= base::win::VERSION_VISTA;
106 #endif 100 #endif
107 101
108 return false; 102 return false;
109 } 103 }
110 104
111 bool IsDelegatedRendererEnabled() { 105 bool IsDelegatedRendererEnabled() {
112 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 106 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
113 bool enabled = false; 107 bool enabled = false;
114 108
115 #if defined(USE_AURA) && !defined(OS_CHROMEOS) 109 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
(...skipping 24 matching lines...) Expand all
140 bool enabled = false; 134 bool enabled = false;
141 135
142 // Flags override. 136 // Flags override.
143 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling); 137 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling);
144 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling); 138 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling);
145 139
146 return enabled; 140 return enabled;
147 } 141 }
148 142
149 } // namespace content 143 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/config/software_rendering_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698