Commit 8fc6448e authored by kbr@google.com's avatar kbr@google.com

Temporarily work around GPU process crash on Mac OS X.

BUG=52957
TEST=none (ran 3D CSS demos with --enable-accelerated-compositing)

Review URL: http://codereview.chromium.org/3150030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57130 0039d316-1c4b-4281-b951-d872f2087c98
parent 1a5fc691
...@@ -55,6 +55,8 @@ static void CollectVideoCardInfo(CGDirectDisplayID displayID, ...@@ -55,6 +55,8 @@ static void CollectVideoCardInfo(CGDirectDisplayID displayID,
CFReleaseIf(deviceIDRef); CFReleaseIf(deviceIDRef);
} }
// TODO(maf): uncomment when using code below is re-enabled.
/*
// Return a pointer to the last character with value c in string s. // Return a pointer to the last character with value c in string s.
// Returns NULL if c is not found. // Returns NULL if c is not found.
static char* FindLastChar(char *s, char c) { static char* FindLastChar(char *s, char c) {
...@@ -67,6 +69,7 @@ static char* FindLastChar(char *s, char c) { ...@@ -67,6 +69,7 @@ static char* FindLastChar(char *s, char c) {
} }
return s_found; return s_found;
} }
*/
bool CollectGraphicsInfo(GPUInfo& gpu_info) { bool CollectGraphicsInfo(GPUInfo& gpu_info) {
...@@ -75,10 +78,13 @@ bool CollectGraphicsInfo(GPUInfo& gpu_info) { ...@@ -75,10 +78,13 @@ bool CollectGraphicsInfo(GPUInfo& gpu_info) {
std::wstring driver_version = L""; std::wstring driver_version = L"";
uint32 pixel_shader_version = 0u; uint32 pixel_shader_version = 0u;
uint32 vertex_shader_version = 0u; uint32 vertex_shader_version = 0u;
uint32 gl_version; uint32 gl_version = 0u;
CollectVideoCardInfo(kCGDirectMainDisplay, &vendor_id, &device_id); CollectVideoCardInfo(kCGDirectMainDisplay, &vendor_id, &device_id);
// TODO(maf): when this is called, there is no OpenGL context
// current, so calls to glGetString crash.
/*
char *gl_version_string = (char*)glGetString(GL_VERSION); char *gl_version_string = (char*)glGetString(GL_VERSION);
char *gl_extensions_string = (char*)glGetString(GL_EXTENSIONS); char *gl_extensions_string = (char*)glGetString(GL_EXTENSIONS);
...@@ -124,6 +130,7 @@ bool CollectGraphicsInfo(GPUInfo& gpu_info) { ...@@ -124,6 +130,7 @@ bool CollectGraphicsInfo(GPUInfo& gpu_info) {
gl_version = ((gl_major << 16) & 0xffff0000) gl_version = ((gl_major << 16) & 0xffff0000)
+ (gl_minor & 0x0000ffff); + (gl_minor & 0x0000ffff);
*/
gpu_info.SetGraphicsInfo(vendor_id, device_id, driver_version, gpu_info.SetGraphicsInfo(vendor_id, device_id, driver_version,
pixel_shader_version, vertex_shader_version, pixel_shader_version, vertex_shader_version,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment