OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 from telemetry.core import gpu_device | 5 from telemetry.core import gpu_device |
6 | 6 |
| 7 |
7 class GPUInfo(object): | 8 class GPUInfo(object): |
8 """Provides information about the GPUs on the system.""" | 9 """Provides information about the GPUs on the system.""" |
9 | 10 |
10 def __init__(self, device_array, aux_attributes, | 11 def __init__(self, device_array, aux_attributes, |
11 feature_status, driver_bug_workarounds): | 12 feature_status, driver_bug_workarounds): |
12 if device_array == None: | 13 if device_array == None: |
13 raise Exception('Missing required "devices" property') | 14 raise Exception('Missing required "devices" property') |
14 if len(device_array) == 0: | 15 if len(device_array) == 0: |
15 raise Exception('Missing at least one GPU in device_array') | 16 raise Exception('Missing at least one GPU in device_array') |
16 | 17 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 58 |
58 @property | 59 @property |
59 def feature_status(self): | 60 def feature_status(self): |
60 """Returns an optional dictionary of graphics features and their status.""" | 61 """Returns an optional dictionary of graphics features and their status.""" |
61 return self._feature_status | 62 return self._feature_status |
62 | 63 |
63 @property | 64 @property |
64 def driver_bug_workarounds(self): | 65 def driver_bug_workarounds(self): |
65 """Returns an optional array of driver bug workarounds.""" | 66 """Returns an optional array of driver bug workarounds.""" |
66 return self._driver_bug_workarounds | 67 return self._driver_bug_workarounds |
OLD | NEW |