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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } | |
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 Loading... |
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 |
OLD | NEW |