| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, | 47 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, |
| 48 H264PROFILE_SCALABLEBASELINE = 7, | 48 H264PROFILE_SCALABLEBASELINE = 7, |
| 49 H264PROFILE_SCALABLEHIGH = 8, | 49 H264PROFILE_SCALABLEHIGH = 8, |
| 50 H264PROFILE_STEREOHIGH = 9, | 50 H264PROFILE_STEREOHIGH = 9, |
| 51 H264PROFILE_MULTIVIEWHIGH = 10, | 51 H264PROFILE_MULTIVIEWHIGH = 10, |
| 52 VP8PROFILE_ANY = 11, | 52 VP8PROFILE_ANY = 11, |
| 53 VP9PROFILE_ANY = 12, | 53 VP9PROFILE_ANY = 12, |
| 54 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_ANY, | 54 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_ANY, |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 // Specification of a decoding profile supported by a hardware decoder. |
| 58 struct GPU_EXPORT VideoDecodeAcceleratorSupportedProfile { |
| 59 VideoCodecProfile profile; |
| 60 gfx::Size max_resolution; |
| 61 gfx::Size min_resolution; |
| 62 }; |
| 63 |
| 57 // Specification of an encoding profile supported by a hardware encoder. | 64 // Specification of an encoding profile supported by a hardware encoder. |
| 58 struct GPU_EXPORT VideoEncodeAcceleratorSupportedProfile { | 65 struct GPU_EXPORT VideoEncodeAcceleratorSupportedProfile { |
| 59 VideoCodecProfile profile; | 66 VideoCodecProfile profile; |
| 60 gfx::Size max_resolution; | 67 gfx::Size max_resolution; |
| 61 uint32 max_framerate_numerator; | 68 uint32 max_framerate_numerator; |
| 62 uint32 max_framerate_denominator; | 69 uint32 max_framerate_denominator; |
| 63 }; | 70 }; |
| 64 | 71 |
| 65 struct GPU_EXPORT GPUInfo { | 72 struct GPU_EXPORT GPUInfo { |
| 66 struct GPU_EXPORT GPUDevice { | 73 struct GPU_EXPORT GPUDevice { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // if the collection fails or not. | 202 // if the collection fails or not. |
| 196 CollectInfoResult basic_info_state; | 203 CollectInfoResult basic_info_state; |
| 197 CollectInfoResult context_info_state; | 204 CollectInfoResult context_info_state; |
| 198 #if defined(OS_WIN) | 205 #if defined(OS_WIN) |
| 199 CollectInfoResult dx_diagnostics_info_state; | 206 CollectInfoResult dx_diagnostics_info_state; |
| 200 | 207 |
| 201 // The information returned by the DirectX Diagnostics Tool. | 208 // The information returned by the DirectX Diagnostics Tool. |
| 202 DxDiagNode dx_diagnostics; | 209 DxDiagNode dx_diagnostics; |
| 203 #endif | 210 #endif |
| 204 | 211 |
| 212 std::vector<VideoDecodeAcceleratorSupportedProfile> |
| 213 video_decode_accelerator_supported_profiles; |
| 205 std::vector<VideoEncodeAcceleratorSupportedProfile> | 214 std::vector<VideoEncodeAcceleratorSupportedProfile> |
| 206 video_encode_accelerator_supported_profiles; | 215 video_encode_accelerator_supported_profiles; |
| 207 // Note: when adding new members, please remember to update EnumerateFields | 216 // Note: when adding new members, please remember to update EnumerateFields |
| 208 // in gpu_info.cc. | 217 // in gpu_info.cc. |
| 209 | 218 |
| 210 // In conjunction with EnumerateFields, this allows the embedder to | 219 // In conjunction with EnumerateFields, this allows the embedder to |
| 211 // enumerate the values in this structure without having to embed | 220 // enumerate the values in this structure without having to embed |
| 212 // references to its specific member variables. This simplifies the | 221 // references to its specific member variables. This simplifies the |
| 213 // addition of new fields to this type. | 222 // addition of new fields to this type. |
| 214 class Enumerator { | 223 class Enumerator { |
| 215 public: | 224 public: |
| 216 // The following methods apply to the "current" object. Initially this | 225 // The following methods apply to the "current" object. Initially this |
| 217 // is the root object, but calls to BeginGPUDevice/EndGPUDevice and | 226 // is the root object, but calls to BeginGPUDevice/EndGPUDevice and |
| 218 // BeginAuxAttributes/EndAuxAttributes change the object to which these | 227 // BeginAuxAttributes/EndAuxAttributes change the object to which these |
| 219 // calls should apply. | 228 // calls should apply. |
| 220 virtual void AddInt64(const char* name, int64 value) = 0; | 229 virtual void AddInt64(const char* name, int64 value) = 0; |
| 221 virtual void AddInt(const char* name, int value) = 0; | 230 virtual void AddInt(const char* name, int value) = 0; |
| 222 virtual void AddString(const char* name, const std::string& value) = 0; | 231 virtual void AddString(const char* name, const std::string& value) = 0; |
| 223 virtual void AddBool(const char* name, bool value) = 0; | 232 virtual void AddBool(const char* name, bool value) = 0; |
| 224 virtual void AddTimeDeltaInSecondsF(const char* name, | 233 virtual void AddTimeDeltaInSecondsF(const char* name, |
| 225 const base::TimeDelta& value) = 0; | 234 const base::TimeDelta& value) = 0; |
| 226 | 235 |
| 227 // Markers indicating that a GPUDevice is being described. | 236 // Markers indicating that a GPUDevice is being described. |
| 228 virtual void BeginGPUDevice() = 0; | 237 virtual void BeginGPUDevice() = 0; |
| 229 virtual void EndGPUDevice() = 0; | 238 virtual void EndGPUDevice() = 0; |
| 230 | 239 |
| 240 // Markers indicating that a VideoDecodeAcceleratorSupportedProfile is |
| 241 // being described. |
| 242 virtual void BeginVideoDecodeAcceleratorSupportedProfile() = 0; |
| 243 virtual void EndVideoDecodeAcceleratorSupportedProfile() = 0; |
| 244 |
| 231 // Markers indicating that a VideoEncodeAcceleratorSupportedProfile is | 245 // Markers indicating that a VideoEncodeAcceleratorSupportedProfile is |
| 232 // being described. | 246 // being described. |
| 233 virtual void BeginVideoEncodeAcceleratorSupportedProfile() = 0; | 247 virtual void BeginVideoEncodeAcceleratorSupportedProfile() = 0; |
| 234 virtual void EndVideoEncodeAcceleratorSupportedProfile() = 0; | 248 virtual void EndVideoEncodeAcceleratorSupportedProfile() = 0; |
| 235 | 249 |
| 236 // Markers indicating that "auxiliary" attributes of the GPUInfo | 250 // Markers indicating that "auxiliary" attributes of the GPUInfo |
| 237 // (according to the DevTools protocol) are being described. | 251 // (according to the DevTools protocol) are being described. |
| 238 virtual void BeginAuxAttributes() = 0; | 252 virtual void BeginAuxAttributes() = 0; |
| 239 virtual void EndAuxAttributes() = 0; | 253 virtual void EndAuxAttributes() = 0; |
| 240 | 254 |
| 241 protected: | 255 protected: |
| 242 virtual ~Enumerator() {} | 256 virtual ~Enumerator() {} |
| 243 }; | 257 }; |
| 244 | 258 |
| 245 // Outputs the fields in this structure to the provided enumerator. | 259 // Outputs the fields in this structure to the provided enumerator. |
| 246 void EnumerateFields(Enumerator* enumerator) const; | 260 void EnumerateFields(Enumerator* enumerator) const; |
| 247 }; | 261 }; |
| 248 | 262 |
| 249 } // namespace gpu | 263 } // namespace gpu |
| 250 | 264 |
| 251 #endif // GPU_CONFIG_GPU_INFO_H_ | 265 #endif // GPU_CONFIG_GPU_INFO_H_ |
| OLD | NEW |