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

Unified Diff: content/browser/gpu/gpu_data_manager.cc

Issue 8383008: Add a command-line switch --skip-gpu-data-loading. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/gpu/gpu_data_manager.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager.cc
===================================================================
--- content/browser/gpu/gpu_data_manager.cc (revision 107391)
+++ content/browser/gpu/gpu_data_manager.cc (working copy)
@@ -153,7 +153,8 @@
disable_accelerated_layers_(false),
disable_experimental_webgl_(false),
disable_gl_multisampling_(false),
- ignore_gpu_blacklist_(false) {
+ ignore_gpu_blacklist_(false),
+ skip_gpu_data_loading_(false) {
}
void GpuDataManager::UserFlags::Initialize() {
@@ -173,6 +174,8 @@
ignore_gpu_blacklist_ = browser_command_line.HasSwitch(
switches::kIgnoreGpuBlacklist);
+ skip_gpu_data_loading_ = browser_command_line.HasSwitch(
+ switches::kSkipGpuDataLoading);
use_gl_ = browser_command_line.GetSwitchValueASCII(switches::kUseGL);
@@ -192,18 +195,20 @@
}
void GpuDataManager::Initialize() {
+ // User flags need to be collected before any further initialization.
+ user_flags_.Initialize();
+
// Certain tests doesn't go through the browser startup path that
// initializes GpuDataManager on FILE thread; therefore, it is initialized
// on UI thread later, and we skip the preliminary gpu info collection
// in such situation.
- if (BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ if (!user_flags_.skip_gpu_data_loading() &&
+ BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
content::GPUInfo gpu_info;
gpu_info_collector::CollectPreliminaryGraphicsInfo(&gpu_info);
UpdateGpuInfo(gpu_info);
}
- user_flags_.Initialize();
-
#if defined(OS_MACOSX)
CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, this);
#endif
@@ -361,7 +366,7 @@
}
GpuBlacklist* blacklist = GetGpuBlacklist();
- if (blacklist && (!UseGLIsOSMesaOrAny()))
+ if (blacklist)
blacklist->GetBlacklistReasons(problem_list);
status->Set("problems", problem_list);
@@ -396,15 +401,10 @@
}
GpuFeatureFlags GpuDataManager::GetGpuFeatureFlags() {
- if (UseGLIsOSMesaOrAny())
- return GpuFeatureFlags();
return gpu_feature_flags_;
}
bool GpuDataManager::GpuAccessAllowed() {
- if (UseGLIsOSMesaOrAny())
- return true;
-
// We only need to block GPU process if more features are disallowed other
// than those in the preliminary gpu feature flags because the latter work
// through renderer commandline switches.
@@ -695,11 +695,6 @@
return gpu_blacklist_.get();
}
-bool GpuDataManager::UseGLIsOSMesaOrAny() {
- return (user_flags_.use_gl() == "any" ||
- user_flags_.use_gl() == gfx::kGLImplementationOSMesaName);
-}
-
bool GpuDataManager::Merge(content::GPUInfo* object,
const content::GPUInfo& other) {
if (object->device_id != other.device_id ||
« no previous file with comments | « content/browser/gpu/gpu_data_manager.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698