Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |