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 #ifndef GPU_CONFIG_GPU_INFO_H_ | 5 #ifndef GPU_CONFIG_GPU_INFO_H_ |
| 6 #define GPU_CONFIG_GPU_INFO_H_ | 6 #define GPU_CONFIG_GPU_INFO_H_ |
| 7 | 7 |
| 8 // Provides access to the GPU information for the system | 8 // Provides access to the GPU information for the system |
| 9 // on which chrome is currently running. | 9 // on which chrome is currently running. |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 // In Linux these strings are obtained through libpci. | 37 // In Linux these strings are obtained through libpci. |
| 38 // In Win/MacOSX, these two strings are not filled at the moment. | 38 // In Win/MacOSX, these two strings are not filled at the moment. |
| 39 // In Android, these are respectively GL_VENDOR and GL_RENDERER. | 39 // In Android, these are respectively GL_VENDOR and GL_RENDERER. |
| 40 std::string vendor_string; | 40 std::string vendor_string; |
| 41 std::string device_string; | 41 std::string device_string; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 GPUInfo(); | 44 GPUInfo(); |
| 45 ~GPUInfo(); | 45 ~GPUInfo(); |
| 46 | 46 |
| 47 bool SupportsAccelerated2dCanvas() const { | |
|
Zhenyao Mo
2013/12/03 02:57:14
Does it violate coding style to define such a func
| |
| 48 return !can_lose_context && !software_rendering; | |
| 49 } | |
| 50 | |
| 47 // Whether more GPUInfo fields might be collected in the future. | 51 // Whether more GPUInfo fields might be collected in the future. |
| 48 bool finalized; | 52 bool finalized; |
| 49 | 53 |
| 50 // The amount of time taken to get from the process starting to the message | 54 // The amount of time taken to get from the process starting to the message |
| 51 // loop being pumped. | 55 // loop being pumped. |
| 52 base::TimeDelta initialization_time; | 56 base::TimeDelta initialization_time; |
| 53 | 57 |
| 54 // Computer has NVIDIA Optimus | 58 // Computer has NVIDIA Optimus |
| 55 bool optimus; | 59 bool optimus; |
| 56 | 60 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 virtual ~Enumerator() {} | 178 virtual ~Enumerator() {} |
| 175 }; | 179 }; |
| 176 | 180 |
| 177 // Outputs the fields in this structure to the provided enumerator. | 181 // Outputs the fields in this structure to the provided enumerator. |
| 178 void EnumerateFields(Enumerator* enumerator) const; | 182 void EnumerateFields(Enumerator* enumerator) const; |
| 179 }; | 183 }; |
| 180 | 184 |
| 181 } // namespace gpu | 185 } // namespace gpu |
| 182 | 186 |
| 183 #endif // GPU_CONFIG_GPU_INFO_H_ | 187 #endif // GPU_CONFIG_GPU_INFO_H_ |
| OLD | NEW |