| 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  | 
 |   11 #include <stdint.h> | 
 |   12  | 
|   11 #include <string> |   13 #include <string> | 
|   12 #include <vector> |   14 #include <vector> | 
|   13  |   15  | 
|   14 #include "base/basictypes.h" |  | 
|   15 #include "base/time/time.h" |   16 #include "base/time/time.h" | 
|   16 #include "base/version.h" |   17 #include "base/version.h" | 
|   17 #include "build/build_config.h" |   18 #include "build/build_config.h" | 
|   18 #include "gpu/config/dx_diag_node.h" |   19 #include "gpu/config/dx_diag_node.h" | 
|   19 #include "gpu/gpu_export.h" |   20 #include "gpu/gpu_export.h" | 
|   20 #include "ui/gfx/geometry/size.h" |   21 #include "ui/gfx/geometry/size.h" | 
|   21  |   22  | 
|   22 namespace gpu { |   23 namespace gpu { | 
|   23  |   24  | 
|   24 // Result for the various Collect*Info* functions below. |   25 // Result for the various Collect*Info* functions below. | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   68   VideoDecodeAcceleratorCapabilities(); |   69   VideoDecodeAcceleratorCapabilities(); | 
|   69   ~VideoDecodeAcceleratorCapabilities(); |   70   ~VideoDecodeAcceleratorCapabilities(); | 
|   70   VideoDecodeAcceleratorSupportedProfiles supported_profiles; |   71   VideoDecodeAcceleratorSupportedProfiles supported_profiles; | 
|   71   uint32_t flags; |   72   uint32_t flags; | 
|   72 }; |   73 }; | 
|   73  |   74  | 
|   74 // Specification of an encoding profile supported by a hardware encoder. |   75 // Specification of an encoding profile supported by a hardware encoder. | 
|   75 struct GPU_EXPORT VideoEncodeAcceleratorSupportedProfile { |   76 struct GPU_EXPORT VideoEncodeAcceleratorSupportedProfile { | 
|   76   VideoCodecProfile profile; |   77   VideoCodecProfile profile; | 
|   77   gfx::Size max_resolution; |   78   gfx::Size max_resolution; | 
|   78   uint32 max_framerate_numerator; |   79   uint32_t max_framerate_numerator; | 
|   79   uint32 max_framerate_denominator; |   80   uint32_t max_framerate_denominator; | 
|   80 }; |   81 }; | 
|   81 using VideoEncodeAcceleratorSupportedProfiles = |   82 using VideoEncodeAcceleratorSupportedProfiles = | 
|   82     std::vector<VideoEncodeAcceleratorSupportedProfile>; |   83     std::vector<VideoEncodeAcceleratorSupportedProfile>; | 
|   83  |   84  | 
|   84 struct GPU_EXPORT GPUInfo { |   85 struct GPU_EXPORT GPUInfo { | 
|   85   struct GPU_EXPORT GPUDevice { |   86   struct GPU_EXPORT GPUDevice { | 
|   86     GPUDevice(); |   87     GPUDevice(); | 
|   87     ~GPUDevice(); |   88     ~GPUDevice(); | 
|   88  |   89  | 
|   89     // The DWORD (uint32) representing the graphics card vendor id. |   90     // The DWORD (uint32_t) representing the graphics card vendor id. | 
|   90     uint32 vendor_id; |   91     uint32_t vendor_id; | 
|   91  |   92  | 
|   92     // The DWORD (uint32) representing the graphics card device id. |   93     // The DWORD (uint32_t) representing the graphics card device id. | 
|   93     // Device ids are unique to vendor, not to one another. |   94     // Device ids are unique to vendor, not to one another. | 
|   94     uint32 device_id; |   95     uint32_t device_id; | 
|   95  |   96  | 
|   96     // Whether this GPU is the currently used one. |   97     // Whether this GPU is the currently used one. | 
|   97     // Currently this field is only supported and meaningful on OS X. |   98     // Currently this field is only supported and meaningful on OS X. | 
|   98     bool active; |   99     bool active; | 
|   99  |  100  | 
|  100     // The strings that describe the GPU. |  101     // The strings that describe the GPU. | 
|  101     // In Linux these strings are obtained through libpci. |  102     // In Linux these strings are obtained through libpci. | 
|  102     // In Win/MacOSX, these two strings are not filled at the moment. |  103     // In Win/MacOSX, these two strings are not filled at the moment. | 
|  103     // In Android, these are respectively GL_VENDOR and GL_RENDERER. |  104     // In Android, these are respectively GL_VENDOR and GL_RENDERER. | 
|  104     std::string vendor_string; |  105     std::string vendor_string; | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  133   GPUDevice gpu; |  134   GPUDevice gpu; | 
|  134  |  135  | 
|  135   // Secondary GPUs, for example, the integrated GPU in a dual GPU machine. |  136   // Secondary GPUs, for example, the integrated GPU in a dual GPU machine. | 
|  136   std::vector<GPUDevice> secondary_gpus; |  137   std::vector<GPUDevice> secondary_gpus; | 
|  137  |  138  | 
|  138   // On Windows, the unique identifier of the adapter the GPU process uses. |  139   // On Windows, the unique identifier of the adapter the GPU process uses. | 
|  139   // The default is zero, which makes the browser process create its D3D device |  140   // The default is zero, which makes the browser process create its D3D device | 
|  140   // on the primary adapter. Note that the primary adapter can change at any |  141   // on the primary adapter. Note that the primary adapter can change at any | 
|  141   // time so it is better to specify a particular LUID. Note that valid LUIDs |  142   // time so it is better to specify a particular LUID. Note that valid LUIDs | 
|  142   // are always non-zero. |  143   // are always non-zero. | 
|  143   uint64 adapter_luid; |  144   uint64_t adapter_luid; | 
|  144  |  145  | 
|  145   // The vendor of the graphics driver currently installed. |  146   // The vendor of the graphics driver currently installed. | 
|  146   std::string driver_vendor; |  147   std::string driver_vendor; | 
|  147  |  148  | 
|  148   // The version of the graphics driver currently installed. |  149   // The version of the graphics driver currently installed. | 
|  149   std::string driver_version; |  150   std::string driver_version; | 
|  150  |  151  | 
|  151   // The date of the graphics driver currently installed. |  152   // The date of the graphics driver currently installed. | 
|  152   std::string driver_date; |  153   std::string driver_date; | 
|  153  |  154  | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  189   std::string gl_ws_vendor; |  190   std::string gl_ws_vendor; | 
|  190  |  191  | 
|  191   // GL window system binding version.  "" if not available. |  192   // GL window system binding version.  "" if not available. | 
|  192   std::string gl_ws_version; |  193   std::string gl_ws_version; | 
|  193  |  194  | 
|  194   // GL window system binding extensions.  "" if not available. |  195   // GL window system binding extensions.  "" if not available. | 
|  195   std::string gl_ws_extensions; |  196   std::string gl_ws_extensions; | 
|  196  |  197  | 
|  197   // GL reset notification strategy as defined by GL_ARB_robustness. 0 if GPU |  198   // GL reset notification strategy as defined by GL_ARB_robustness. 0 if GPU | 
|  198   // reset detection or notification not available. |  199   // reset detection or notification not available. | 
|  199   uint32 gl_reset_notification_strategy; |  200   uint32_t gl_reset_notification_strategy; | 
|  200  |  201  | 
|  201   // The device semantics, i.e. whether the Vista and Windows 7 specific |  202   // The device semantics, i.e. whether the Vista and Windows 7 specific | 
|  202   // semantics are available. |  203   // semantics are available. | 
|  203   bool can_lose_context; |  204   bool can_lose_context; | 
|  204  |  205  | 
|  205   bool software_rendering; |  206   bool software_rendering; | 
|  206  |  207  | 
|  207   // Whether the driver uses direct rendering. True on most platforms, false on |  208   // Whether the driver uses direct rendering. True on most platforms, false on | 
|  208   // X11 when using remote X. |  209   // X11 when using remote X. | 
|  209   bool direct_rendering; |  210   bool direct_rendering; | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
|  239   // In conjunction with EnumerateFields, this allows the embedder to |  240   // In conjunction with EnumerateFields, this allows the embedder to | 
|  240   // enumerate the values in this structure without having to embed |  241   // enumerate the values in this structure without having to embed | 
|  241   // references to its specific member variables. This simplifies the |  242   // references to its specific member variables. This simplifies the | 
|  242   // addition of new fields to this type. |  243   // addition of new fields to this type. | 
|  243   class Enumerator { |  244   class Enumerator { | 
|  244    public: |  245    public: | 
|  245     // The following methods apply to the "current" object. Initially this |  246     // The following methods apply to the "current" object. Initially this | 
|  246     // is the root object, but calls to BeginGPUDevice/EndGPUDevice and |  247     // is the root object, but calls to BeginGPUDevice/EndGPUDevice and | 
|  247     // BeginAuxAttributes/EndAuxAttributes change the object to which these |  248     // BeginAuxAttributes/EndAuxAttributes change the object to which these | 
|  248     // calls should apply. |  249     // calls should apply. | 
|  249     virtual void AddInt64(const char* name, int64 value) = 0; |  250     virtual void AddInt64(const char* name, int64_t value) = 0; | 
|  250     virtual void AddInt(const char* name, int value) = 0; |  251     virtual void AddInt(const char* name, int value) = 0; | 
|  251     virtual void AddString(const char* name, const std::string& value) = 0; |  252     virtual void AddString(const char* name, const std::string& value) = 0; | 
|  252     virtual void AddBool(const char* name, bool value) = 0; |  253     virtual void AddBool(const char* name, bool value) = 0; | 
|  253     virtual void AddTimeDeltaInSecondsF(const char* name, |  254     virtual void AddTimeDeltaInSecondsF(const char* name, | 
|  254                                         const base::TimeDelta& value) = 0; |  255                                         const base::TimeDelta& value) = 0; | 
|  255  |  256  | 
|  256     // Markers indicating that a GPUDevice is being described. |  257     // Markers indicating that a GPUDevice is being described. | 
|  257     virtual void BeginGPUDevice() = 0; |  258     virtual void BeginGPUDevice() = 0; | 
|  258     virtual void EndGPUDevice() = 0; |  259     virtual void EndGPUDevice() = 0; | 
|  259  |  260  | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
|  276     virtual ~Enumerator() {} |  277     virtual ~Enumerator() {} | 
|  277   }; |  278   }; | 
|  278  |  279  | 
|  279   // Outputs the fields in this structure to the provided enumerator. |  280   // Outputs the fields in this structure to the provided enumerator. | 
|  280   void EnumerateFields(Enumerator* enumerator) const; |  281   void EnumerateFields(Enumerator* enumerator) const; | 
|  281 }; |  282 }; | 
|  282  |  283  | 
|  283 }  // namespace gpu |  284 }  // namespace gpu | 
|  284  |  285  | 
|  285 #endif  // GPU_CONFIG_GPU_INFO_H_ |  286 #endif  // GPU_CONFIG_GPU_INFO_H_ | 
| OLD | NEW |