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

Unified Diff: gpu/config/gpu_info_collector_linux.cc

Issue 692893004: Provide a way to disable libpci dependency. (Closed) Base URL: git://nuxepg2.fr.nds.com/CHROM/chromium-src.git@master
Patch Set: Move use_libpci = true into declare_args() Created 6 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 | « gpu/config/BUILD.gn ('k') | gpu/gpu_config.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector_linux.cc
diff --git a/gpu/config/gpu_info_collector_linux.cc b/gpu/config/gpu_info_collector_linux.cc
index 9a21a2de09347b03b50b30c200447a61e8e39811..061fe35929e5acf5019dc2e5e6a0624332fadeed 100644
--- a/gpu/config/gpu_info_collector_linux.cc
+++ b/gpu/config/gpu_info_collector_linux.cc
@@ -17,13 +17,16 @@
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "gpu/config/gpu_info_collector.h"
-#include "library_loaders/libpci.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
+#if defined(USE_LIBPCI)
+#include "library_loaders/libpci.h"
+#endif
+
namespace gpu {
namespace {
@@ -72,6 +75,10 @@ const uint32 kVendorIDAMD = 0x1002;
CollectInfoResult CollectPCIVideoCardInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
+#if !defined(USE_LIBPCI)
+ return kCollectInfoNonFatalFailure;
+#else
+
if (IsPciSupported() == false) {
VLOG(1) << "PCI bus scanning is not supported";
return kCollectInfoNonFatalFailure;
@@ -144,6 +151,7 @@ CollectInfoResult CollectPCIVideoCardInfo(GPUInfo* gpu_info) {
if (!primary_gpu_identified)
return kCollectInfoNonFatalFailure;
return kCollectInfoSuccess;
+#endif
}
} // namespace anonymous
« no previous file with comments | « gpu/config/BUILD.gn ('k') | gpu/gpu_config.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698