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

Unified Diff: content/gpu/gpu_info_collector_linux.cc

Issue 8476013: Don't initialize GL bindings in browser process even if libpic doesn't exist on Linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « chrome/browser/resources/software_rendering_list.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_info_collector_linux.cc
===================================================================
--- content/gpu/gpu_info_collector_linux.cc (revision 108682)
+++ content/gpu/gpu_info_collector_linux.cc (working copy)
@@ -164,30 +164,6 @@
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 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 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;
« no previous file with comments | « chrome/browser/resources/software_rendering_list.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698