Commit 9972bf5a authored by zmo@chromium.org's avatar zmo@chromium.org

Remove PCI names lookup in gpu info collection in linux.

We are not using the names information at the moment.

From Eric Seidal's profiling, that is a big bottleneck in content shell startup.

BUG=
TEST=tree
Review URL: https://codereview.chromium.org/13730014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192840 0039d316-1c4b-4281-b951-d872f2087c98
parent 8b09d3f9
......@@ -130,34 +130,6 @@ bool CollectPCIVideoCardInfo(content::GPUInfo* gpu_info) {
gpu.vendor_id = device->vendor_id;
gpu.device_id = device->device_id;
const int buffer_size = 255;
scoped_ptr<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;
......
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