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 "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 bool IsImplSidePaintingEnabled() { | 188 bool IsImplSidePaintingEnabled() { |
| 189 const base::CommandLine& command_line = | 189 const base::CommandLine& command_line = |
| 190 *base::CommandLine::ForCurrentProcess(); | 190 *base::CommandLine::ForCurrentProcess(); |
| 191 | 191 |
| 192 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) | 192 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) |
| 193 return false; | 193 return false; |
| 194 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) | 194 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) |
| 195 return true; | 195 return true; |
| 196 else if (command_line.HasSwitch( | 196 else if (command_line.HasSwitch( |
| 197 switches::kEnableBleedingEdgeRenderingFastPaths)) | 197 switches::kEnableBleedingEdgeRenderingFastPaths)) |
| 198 return true; | 198 return true; |
|
piman
2014/08/25 18:09:38
nit: Some of those ifs can go away now.
I think we
reveman
2014/08/25 21:18:54
kEnableImplSidePainting could be removed but I thi
| |
| 199 | 199 |
| 200 #if defined(OS_MACOSX) | |
| 201 return false; | |
| 202 #else | |
| 203 return true; | 200 return true; |
| 204 #endif | |
| 205 } | 201 } |
| 206 | 202 |
| 207 bool IsGpuRasterizationEnabled() { | 203 bool IsGpuRasterizationEnabled() { |
| 208 const base::CommandLine& command_line = | 204 const base::CommandLine& command_line = |
| 209 *base::CommandLine::ForCurrentProcess(); | 205 *base::CommandLine::ForCurrentProcess(); |
| 210 | 206 |
| 211 if (!IsImplSidePaintingEnabled()) | 207 if (!IsImplSidePaintingEnabled()) |
| 212 return false; | 208 return false; |
| 213 | 209 |
| 214 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) | 210 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 return problem_list; | 321 return problem_list; |
| 326 } | 322 } |
| 327 | 323 |
| 328 base::Value* GetDriverBugWorkarounds() { | 324 base::Value* GetDriverBugWorkarounds() { |
| 329 base::ListValue* workaround_list = new base::ListValue(); | 325 base::ListValue* workaround_list = new base::ListValue(); |
| 330 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 326 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
| 331 return workaround_list; | 327 return workaround_list; |
| 332 } | 328 } |
| 333 | 329 |
| 334 } // namespace content | 330 } // namespace content |
| OLD | NEW |