Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1411)

Unified Diff: content/gpu/gpu_info_collector.h

Issue 11576052: Revert 173248, broke building on the official chrome/win bot: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/gpu/gpu_info_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_info_collector.h
===================================================================
--- content/gpu/gpu_info_collector.h (revision 173266)
+++ content/gpu/gpu_info_collector.h (working copy)
@@ -10,41 +10,60 @@
#include "content/common/content_export.h"
#include "content/public/common/gpu_info.h"
+struct IDirect3D9;
+
namespace gpu_info_collector {
-// Collects basic GPU info without creating a GL/DirectX context (and without
-// the danger of crashing), including vendor_id and device_id.
-// This is called at browser process startup time.
+// Populate variables with necessary graphics card information.
+// Returns true on success.
+bool CollectGraphicsInfo(content::GPUInfo* gpu_info);
+
+// Similar to CollectGraphicsInfo, only this collects a subset of variables
+// without creating a GL/DirectX context (and without the danger of crashing).
// The subset each platform collects may be different.
-CONTENT_EXPORT bool CollectBasicGraphicsInfo(
+CONTENT_EXPORT bool CollectPreliminaryGraphicsInfo(
content::GPUInfo* gpu_info);
-// Create a GL/DirectX context and collect related info.
-// This is called at GPU process startup time.
-// Returns true on success.
-bool CollectContextGraphicsInfo(content::GPUInfo* gpu_info);
+#if defined(OS_WIN)
+// Windows provides two ways of doing graphics so we need two ways of
+// collecting info based on what's on a user's machine.
+// The selection between the two methods is done in the cc file.
-#if defined(OS_WIN)
+// A D3D argument is passed in for testing purposes
+CONTENT_EXPORT bool CollectGraphicsInfoD3D(IDirect3D9* d3d,
+ content::GPUInfo* gpu_info);
+
+// Collects D3D driver version/date through registry lookup.
+// Note that this does not require a D3D context.
+// device_id here is the raw data in DISPLAY_DEVICE.
+CONTENT_EXPORT bool CollectDriverInfoD3D(const std::wstring& device_id,
+ content::GPUInfo* gpu_info);
+
// Collect the DirectX Disagnostics information about the attached displays.
bool GetDxDiagnostics(content::DxDiagNode* output);
#endif // OS_WIN
-// Create a GL context and collect GL strings and versions.
+// All platforms have a GL version for collecting information
CONTENT_EXPORT bool CollectGraphicsInfoGL(content::GPUInfo* gpu_info);
+// Collect GL and Shading language version information
+bool CollectGLVersionInfo(content::GPUInfo* gpu_info);
+
+// Platform specific method for collecting vendor and device ids
+bool CollectVideoCardInfo(content::GPUInfo* gpu_info);
+
// Each platform stores the driver version on the GL_VERSION string differently
bool CollectDriverInfoGL(content::GPUInfo* gpu_info);
-// Merge GPUInfo from CollectContextGraphicsInfo into basic GPUInfo.
-// This is platform specific, depending on which info are collected at which
-// stage.
-void MergeGPUInfo(content::GPUInfo* basic_gpu_info,
- const content::GPUInfo& context_gpu_info);
+// Advanced Micro Devices has interesting configurations on laptops were
+// there are two videocards that can alternatively a given process output.
+enum AMDVideoCardType {
+ UNKNOWN,
+ STANDALONE,
+ INTEGRATED,
+ SWITCHABLE
+};
-// MergeGPUInfo() when GL driver is used.
-void MergeGPUInfoGL(content::GPUInfo* basic_gpu_info,
- const content::GPUInfo& context_gpu_info);
-
} // namespace gpu_info_collector
#endif // CONTENT_GPU_GPU_INFO_COLLECTOR_H_
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/gpu/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698