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

Unified Diff: content/browser/devtools/protocol/system_info_handler.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a new commandline switch to prevent full gpu info collection in the test Created 4 years, 11 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 | « content/browser/browser_main_loop.cc ('k') | content/browser/gpu/gpu_data_manager_impl_private.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/system_info_handler.cc
diff --git a/content/browser/devtools/protocol/system_info_handler.cc b/content/browser/devtools/protocol/system_info_handler.cc
index 27877b0bd981f9fd9d43169fdc261953642d22e8..340bca475580c466412c82c40a82cd54407f7c9e 100644
--- a/content/browser/devtools/protocol/system_info_handler.cc
+++ b/content/browser/devtools/protocol/system_info_handler.cc
@@ -8,9 +8,12 @@
#include <utility>
#include "base/bind.h"
+#include "base/command_line.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/public/browser/gpu_data_manager.h"
+#include "gpu/config/gpu_feature_type.h"
#include "gpu/config/gpu_info.h"
+#include "gpu/config/gpu_switches.h"
namespace content {
namespace devtools {
@@ -147,9 +150,22 @@ void SystemInfoHandler::SetClient(scoped_ptr<Client> client) {
}
Response SystemInfoHandler::GetInfo(DevToolsCommandId command_id) {
+ bool skip_request_collection = false;
+#if defined(OS_LINUX)
+ skip_request_collection = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGpuTestingNoCompleteInfoCollection);
+ for (int feature = 0; feature < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++feature) {
Zhenyao Mo 2016/02/02 22:22:34 I don't think this for-loop logic is necessary. I
+ skip_request_collection &=
+ GpuDataManager::GetInstance()->IsFeatureBlacklisted(feature);
+ if (!skip_request_collection)
+ break;
+ }
+#endif
+
std::string reason;
if (!GpuDataManager::GetInstance()->GpuAccessAllowed(&reason) ||
- GpuDataManager::GetInstance()->IsEssentialGpuInfoAvailable()) {
+ GpuDataManager::GetInstance()->IsEssentialGpuInfoAvailable() ||
+ skip_request_collection) {
// The GpuDataManager already has all of the information needed to make
// GPU-based blacklisting decisions. Post a task to give it to the
// client asynchronously.
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/gpu/gpu_data_manager_impl_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698