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

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

Issue 242803007: Re-land: cc: Enable impl-side painting by default on all platforms where threaded composit... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 "build/build_config.h" 9 #include "build/build_config.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 199
200 bool IsImplSidePaintingEnabled() { 200 bool IsImplSidePaintingEnabled() {
201 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 201 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
202 202
203 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) 203 if (command_line.HasSwitch(switches::kDisableImplSidePainting))
204 return false; 204 return false;
205 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) 205 else if (command_line.HasSwitch(switches::kEnableImplSidePainting))
206 return true; 206 return true;
207 207
208 #if defined(OS_ANDROID) 208 if (!IsThreadedCompositingEnabled())
209 return false;
210
209 return true; 211 return true;
abarth-chromium 2014/04/25 23:04:56 Drive-by: return IsThreadedCompositingEnabled();
reveman 2014/04/25 23:46:06 Done :)
210 #else
211 return false;
212 #endif
213 } 212 }
214 213
215 bool IsGpuRasterizationEnabled() { 214 bool IsGpuRasterizationEnabled() {
216 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 215 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
217 216
218 if (!IsImplSidePaintingEnabled()) 217 if (!IsImplSidePaintingEnabled())
219 return false; 218 return false;
220 219
221 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) 220 if (command_line.HasSwitch(switches::kDisableGpuRasterization))
222 return false; 221 return false;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 return problem_list; 341 return problem_list;
343 } 342 }
344 343
345 base::Value* GetDriverBugWorkarounds() { 344 base::Value* GetDriverBugWorkarounds() {
346 base::ListValue* workaround_list = new base::ListValue(); 345 base::ListValue* workaround_list = new base::ListValue();
347 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); 346 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list);
348 return workaround_list; 347 return workaround_list;
349 } 348 }
350 349
351 } // namespace content 350 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698