diff options
author | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 23:25:19 +0000 |
---|---|---|
committer | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 23:25:19 +0000 |
commit | fc0d94c64292dc6702e2b4c28e446dbcd14f0ad2 (patch) | |
tree | fa814fb9f7a832aac889f6eed383749ef48a2f03 /content | |
parent | f01e513c6eaeaa21cfb13cfd8eed272228837e3c (diff) | |
download | chromium_src-fc0d94c64292dc6702e2b4c28e446dbcd14f0ad2.zip chromium_src-fc0d94c64292dc6702e2b4c28e446dbcd14f0ad2.tar.gz chromium_src-fc0d94c64292dc6702e2b4c28e446dbcd14f0ad2.tar.bz2 |
Don't initialize GL bindings in browser process even if libpci doesn't exist on Linux.
Initializing GL bindings seems to crash chrome sometime with fglrx drivers. We should definitely avoid that.
So the ATI cards we want to blacklist cannot be done at through preliminary gpu info collection, but it can be done at GPU process launch time. We use GL_VENDOR and GL_RENDERER string for blacklisting rather than vendor_id.
BUG=94973
TEST=unittest
Review URL: http://codereview.chromium.org/8476013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/gpu/gpu_info_collector_linux.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/content/gpu/gpu_info_collector_linux.cc b/content/gpu/gpu_info_collector_linux.cc index 1e89ca8..c2abad8 100644 --- a/content/gpu/gpu_info_collector_linux.cc +++ b/content/gpu/gpu_info_collector_linux.cc @@ -164,30 +164,6 @@ std::string CollectDriverVersionATI() { return ""; } -// Use glXGetClientString to get driver vendor. -// Return "" on failing. -std::string CollectDriverVendorGlx() { - // TODO(zmo): handle the EGL/GLES2 case. - if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) - return ""; - Display* display = XOpenDisplay(NULL); - if (display == NULL) - return ""; - std::string vendor = glXGetClientString(display, GLX_VENDOR); - XCloseDisplay(display); - return vendor; -} - -// Return 0 on unrecognized vendor. -uint32 VendorStringToID(const std::string& vendor_string) { - if (StartsWithASCII(vendor_string, "NVIDIA", true)) - return 0x10de; - if (StartsWithASCII(vendor_string, "ATI", true)) - return 0x1002; - // TODO(zmo): find a way to identify Intel cards. - return 0; -} - } // namespace anonymous namespace gpu_info_collector { @@ -212,11 +188,6 @@ bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { DCHECK(gpu_info); - if (!gfx::GLSurface::InitializeOneOff()) { - LOG(ERROR) << "gfx::GLSurface::InitializeOneOff() failed"; - return false; - } - bool rt = true; if (!CollectVideoCardInfo(gpu_info)) rt = false; @@ -235,14 +206,6 @@ bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { bool CollectVideoCardInfo(content::GPUInfo* gpu_info) { DCHECK(gpu_info); - std::string driver_vendor = CollectDriverVendorGlx(); - if (!driver_vendor.empty()) { - gpu_info->driver_vendor = driver_vendor; - uint32 vendor_id = VendorStringToID(driver_vendor); - if (vendor_id != 0) - gpu_info->vendor_id = vendor_id; - } - if (IsPciSupported() == false) { VLOG(1) << "PCI bus scanning is not supported"; return false; |