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

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: --enable-bleeding-edge-rendering-fast-paths should not bypass blacklist 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 (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted(
276 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) {
277 return false;
278 }
279
275 if (command_line.HasSwitch( 280 if (command_line.HasSwitch(
276 switches::kEnableBleedingEdgeRenderingFastPaths)) { 281 switches::kEnableBleedingEdgeRenderingFastPaths)) {
277 return true; 282 return true;
278 } 283 }
279 284
280 if (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted( 285 #if defined(OS_ANDROID)
281 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) { 286 return true;
282 return false; 287 #else
283 }
284
285 // Change this to true to turn on the feature by default.
286 return false; 288 return false;
289 #endif
Zhenyao Mo 2014/04/17 21:24:14 remove this
ajuma 2014/04/17 22:04:00 Done.
287 } 290 }
288 291
289 bool IsForceGpuRasterizationEnabled() { 292 bool IsForceGpuRasterizationEnabled() {
290 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 293 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
291 294
292 if (!IsImplSidePaintingEnabled()) 295 if (!IsImplSidePaintingEnabled())
293 return false; 296 return false;
294 297
295 return command_line.HasSwitch(switches::kForceGpuRasterization); 298 return command_line.HasSwitch(switches::kForceGpuRasterization);
296 } 299 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 return problem_list; 407 return problem_list;
405 } 408 }
406 409
407 base::Value* GetDriverBugWorkarounds() { 410 base::Value* GetDriverBugWorkarounds() {
408 base::ListValue* workaround_list = new base::ListValue(); 411 base::ListValue* workaround_list = new base::ListValue();
409 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); 412 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list);
410 return workaround_list; 413 return workaround_list;
411 } 414 }
412 415
413 } // namespace content 416 } // 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