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

Unified Diff: content/gpu/gpu_info_collector_linux.cc

Issue 13730014: Remove PCI names lookup in gpu info collection in linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 months 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 | « no previous file | 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 192640)
+++ content/gpu/gpu_info_collector_linux.cc (working copy)
@@ -130,34 +130,6 @@
gpu.vendor_id = device->vendor_id;
gpu.device_id = device->device_id;
- const int buffer_size = 255;
- scoped_array<char> buffer(new char[buffer_size]);
- // The current implementation of pci_lookup_name returns the same pointer
- // as the passed in upon success, and a different one (NULL or a pointer
- // to an error message) upon failure.
- if ((libpci_loader.pci_lookup_name)(access,
- buffer.get(),
- buffer_size,
- 1,
- device->vendor_id) == buffer.get()) {
- gpu.vendor_string = buffer.get();
- }
- if ((libpci_loader.pci_lookup_name)(access,
- buffer.get(),
- buffer_size,
- 2,
- device->vendor_id,
- device->device_id) == buffer.get()) {
- std::string device_string = buffer.get();
- size_t begin = device_string.find_first_of('[');
- size_t end = device_string.find_last_of(']');
- if (begin != std::string::npos && end != std::string::npos &&
- begin < end) {
- device_string = device_string.substr(begin + 1, end - begin - 1);
- }
- gpu.device_string = device_string;
- }
-
if (!primary_gpu_identified) {
primary_gpu_identified = true;
gpu_info->gpu = gpu;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698