| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "gpu/config/gpu_driver_bug_list.h" | 5 #include "gpu/config/gpu_driver_bug_list.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 9 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 std::string GpuDriverBugWorkaroundTypeToString( | 48 std::string GpuDriverBugWorkaroundTypeToString( |
| 49 GpuDriverBugWorkaroundType type) { | 49 GpuDriverBugWorkaroundType type) { |
| 50 if (type < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES) | 50 if (type < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES) |
| 51 return kFeatureList[type].name; | 51 return kFeatureList[type].name; |
| 52 else | 52 else |
| 53 return "unknown"; | 53 return "unknown"; |
| 54 } | 54 } |
| 55 | 55 |
| 56 // static | 56 // static |
| 57 void GpuDriverBugList::AppendWorkaroundsFromCommandLine( | 57 void GpuDriverBugList::AppendWorkaroundsFromCommandLine( |
| 58 std::set<int>* workarounds, const CommandLine& command_line) { | 58 std::set<int>* workarounds, |
| 59 const base::CommandLine& command_line) { |
| 59 DCHECK(workarounds); | 60 DCHECK(workarounds); |
| 60 for (int i = 0; i < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; i++) { | 61 for (int i = 0; i < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; i++) { |
| 61 if (!command_line.HasSwitch(kFeatureList[i].name)) | 62 if (!command_line.HasSwitch(kFeatureList[i].name)) |
| 62 continue; | 63 continue; |
| 63 // Removing conflicting workarounds. | 64 // Removing conflicting workarounds. |
| 64 switch (kFeatureList[i].type) { | 65 switch (kFeatureList[i].type) { |
| 65 case FORCE_DISCRETE_GPU: | 66 case FORCE_DISCRETE_GPU: |
| 66 workarounds->erase(FORCE_INTEGRATED_GPU); | 67 workarounds->erase(FORCE_INTEGRATED_GPU); |
| 67 workarounds->insert(FORCE_DISCRETE_GPU); | 68 workarounds->insert(FORCE_DISCRETE_GPU); |
| 68 break; | 69 break; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 80 break; | 81 break; |
| 81 default: | 82 default: |
| 82 workarounds->insert(kFeatureList[i].type); | 83 workarounds->insert(kFeatureList[i].type); |
| 83 break; | 84 break; |
| 84 } | 85 } |
| 85 } | 86 } |
| 86 } | 87 } |
| 87 | 88 |
| 88 } // namespace gpu | 89 } // namespace gpu |
| 89 | 90 |
| OLD | NEW |