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

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

Issue 241223004: Enable GPU rasterization by default on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also whitelist N7 and MotoX 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 | 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/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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 265 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
266 266
267 if (!IsImplSidePaintingEnabled()) 267 if (!IsImplSidePaintingEnabled())
268 return false; 268 return false;
269 269
270 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) 270 if (command_line.HasSwitch(switches::kDisableGpuRasterization))
271 return false; 271 return false;
272 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) 272 else if (command_line.HasSwitch(switches::kEnableGpuRasterization))
273 return true; 273 return true;
274 274
275 if (command_line.HasSwitch(
276 switches::kEnableBleedingEdgeRenderingFastPaths)) {
277 return true;
278 }
Zhenyao Mo 2014/04/17 22:54:53 I see this is removed instead of moving after blac
ajuma 2014/04/17 22:57:17 Since we're already returning true after the black
Zhenyao Mo 2014/04/17 23:04:19 The only difference is for a system that's blackli
279
280 if (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted( 275 if (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted(
281 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) { 276 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) {
282 return false; 277 return false;
283 } 278 }
284 279
285 // Change this to true to turn on the feature by default. 280 return true;
286 return false;
287 } 281 }
288 282
289 bool IsForceGpuRasterizationEnabled() { 283 bool IsForceGpuRasterizationEnabled() {
290 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 284 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
291 285
292 if (!IsImplSidePaintingEnabled()) 286 if (!IsImplSidePaintingEnabled())
293 return false; 287 return false;
294 288
295 return command_line.HasSwitch(switches::kForceGpuRasterization); 289 return command_line.HasSwitch(switches::kForceGpuRasterization);
296 } 290 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 return problem_list; 398 return problem_list;
405 } 399 }
406 400
407 base::Value* GetDriverBugWorkarounds() { 401 base::Value* GetDriverBugWorkarounds() {
408 base::ListValue* workaround_list = new base::ListValue(); 402 base::ListValue* workaround_list = new base::ListValue();
409 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); 403 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list);
410 return workaround_list; 404 return workaround_list;
411 } 405 }
412 406
413 } // namespace content 407 } // 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