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