Store GPU driver information in profile to reduce memory usage on startup
When chrome starts up, it collect the gpu
driver info to add commend line flags.
However,collecting the driver information is quite expensive as it loads
several libraries.
And we don't need GPU for certain browser process only
tasks (e.g. download resumption)
This CL stores the GPU driver information into the profile.
So that Chrome doesn't need to load native libraries when browser starts up.
Whenever build fingerprint changes, Chrome will refresh the driver info
in profile.
Unlike GLStringManager on linux, the driver information doesn't take
command line switches into consideration
BUG=326295
Review-Url: https://codereview.chromium.org/2197413002
Cr-Commit-Position: refs/heads/master@{#410122}
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 285c698..1672f19 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -45,8 +45,8 @@
#include "chrome/browser/devtools/remote_debugging_server.h"
#include "chrome/browser/download/download_request_limiter.h"
#include "chrome/browser/download/download_status_updater.h"
-#include "chrome/browser/gpu/gl_string_manager.h"
#include "chrome/browser/gpu/gpu_mode_manager.h"
+#include "chrome/browser/gpu/gpu_profile_cache.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/browser/intranet_redirect_detector.h"
#include "chrome/browser/io_thread.h"
@@ -621,11 +621,11 @@
return icon_manager_.get();
}
-GLStringManager* BrowserProcessImpl::gl_string_manager() {
+GpuProfileCache* BrowserProcessImpl::gpu_profile_cache() {
DCHECK(CalledOnValidThread());
- if (!gl_string_manager_.get())
- gl_string_manager_.reset(new GLStringManager());
- return gl_string_manager_.get();
+ if (!gpu_profile_cache_.get())
+ gpu_profile_cache_.reset(GpuProfileCache::Create());
+ return gpu_profile_cache_.get();
}
GpuModeManager* BrowserProcessImpl::gpu_mode_manager() {