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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1117813002: Add GL strings to CastSysInfo interface and use to configure GPU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment on ordering of GpuDataManager calls Created 5 years, 8 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 | « chromecast/base/cast_sys_info_dummy.cc ('k') | chromecast/public/cast_sys_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 45edf44d13197469e5dcf302f1364e341e19a9b4..111f14d6a0f81949e97c7fa399b179df8cd98f0a 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -17,6 +17,7 @@
#include "base/run_loop.h"
#include "cc/base/switches.h"
#include "chromecast/base/cast_paths.h"
+#include "chromecast/base/cast_sys_info_util.h"
#include "chromecast/base/metrics/cast_metrics_helper.h"
#include "chromecast/base/metrics/grouped_histogram.h"
#include "chromecast/browser/cast_browser_context.h"
@@ -30,7 +31,9 @@
#include "chromecast/common/chromecast_switches.h"
#include "chromecast/common/platform_client_auth.h"
#include "chromecast/net/connectivity_checker.h"
+#include "chromecast/public/cast_sys_info.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/gpu_data_manager.h"
#include "content/public/common/content_switches.h"
#include "media/base/browser_cdm_factory.h"
#include "media/base/media_switches.h"
@@ -254,6 +257,14 @@ int CastBrowserMainParts::PreCreateThreads() {
}
void CastBrowserMainParts::PreMainMessageLoopRun() {
+ // Set GL strings so GPU config code can make correct feature blacklisting/
+ // whitelisting decisions.
+ // Note: SetGLStrings MUST be called after GpuDataManager::Initialize.
+ scoped_ptr<CastSysInfo> sys_info = CreateSysInfo();
+ content::GpuDataManager::GetInstance()->SetGLStrings(
+ sys_info->GetGlVendor(), sys_info->GetGlRenderer(),
+ sys_info->GetGlVersion());
+
scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
metrics::RegisterPrefs(pref_registry.get());
cast_browser_process_->SetPrefService(
« no previous file with comments | « chromecast/base/cast_sys_info_dummy.cc ('k') | chromecast/public/cast_sys_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698