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

Side by Side Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove changes from gpu_info_collector files Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/cast_browser_main_parts.h" 5 #include "chromecast/browser/cast_browser_main_parts.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // Also, implicit initialization can cause a long delay on the first 292 // Also, implicit initialization can cause a long delay on the first
293 // rendering if the font cache has to be regenerated for some reason. Doing it 293 // rendering if the font cache has to be regenerated for some reason. Doing it
294 // explicitly here helps in cases where the browser process is starting up in 294 // explicitly here helps in cases where the browser process is starting up in
295 // the background (resources have not yet been granted to cast) since it 295 // the background (resources have not yet been granted to cast) since it
296 // prevents the long delay the user would have seen on first rendering. Note 296 // prevents the long delay the user would have seen on first rendering. Note
297 // that future calls to FcInit() are safe no-ops per the FontConfig interface. 297 // that future calls to FcInit() are safe no-ops per the FontConfig interface.
298 FcInit(); 298 FcInit();
299 #endif 299 #endif
300 } 300 }
301 301
302 int CastBrowserMainParts::PreCreateThreads() { 302 int CastBrowserMainParts::PreCreateThreadsBegin() {
303 #if defined(OS_ANDROID) 303 #if defined(OS_ANDROID)
304 // GPU process is started immediately after threads are created, requiring 304 // GPU process is started immediately after threads are created, requiring
305 // CrashDumpManager to be initialized beforehand. 305 // CrashDumpManager to be initialized beforehand.
306 base::FilePath crash_dumps_dir; 306 base::FilePath crash_dumps_dir;
307 if (!chromecast::CrashHandler::GetCrashDumpLocation(&crash_dumps_dir)) { 307 if (!chromecast::CrashHandler::GetCrashDumpLocation(&crash_dumps_dir)) {
308 LOG(ERROR) << "Could not find crash dump location."; 308 LOG(ERROR) << "Could not find crash dump location.";
309 } 309 }
310 cast_browser_process_->SetCrashDumpManager( 310 cast_browser_process_->SetCrashDumpManager(
311 make_scoped_ptr(new breakpad::CrashDumpManager(crash_dumps_dir))); 311 make_scoped_ptr(new breakpad::CrashDumpManager(crash_dumps_dir)));
312 #else 312 #else
(...skipping 23 matching lines...) Expand all
336 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( 336 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme(
337 kChromeResourceScheme); 337 kChromeResourceScheme);
338 return 0; 338 return 0;
339 } 339 }
340 340
341 void CastBrowserMainParts::PreMainMessageLoopRun() { 341 void CastBrowserMainParts::PreMainMessageLoopRun() {
342 #if !defined(OS_ANDROID) 342 #if !defined(OS_ANDROID)
343 // Set GL strings so GPU config code can make correct feature blacklisting/ 343 // Set GL strings so GPU config code can make correct feature blacklisting/
344 // whitelisting decisions. 344 // whitelisting decisions.
345 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize. 345 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize.
346 // TODO(j.isorce) move SetGLStrings call to PreCreateThreadsEnd, i.e. before
347 // launching the gpu process.
346 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo(); 348 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo();
347 content::GpuDataManager::GetInstance()->SetGLStrings( 349 content::GpuDataManager::GetInstance()->SetGLStrings(
348 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), 350 sys_info->GetGlVendor(), sys_info->GetGlRenderer(),
349 sys_info->GetGlVersion()); 351 sys_info->GetGlVersion());
350 #endif // !defined(OS_ANDROID) 352 #endif // !defined(OS_ANDROID)
351 353
352 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); 354 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
353 metrics::RegisterPrefs(pref_registry.get()); 355 metrics::RegisterPrefs(pref_registry.get());
354 cast_browser_process_->SetPrefService( 356 cast_browser_process_->SetPrefService(
355 PrefServiceHelper::CreatePrefService(pref_registry.get())); 357 PrefServiceHelper::CreatePrefService(pref_registry.get()));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 #if defined(USE_AURA) 456 #if defined(USE_AURA)
455 aura::Env::DeleteInstance(); 457 aura::Env::DeleteInstance();
456 #endif 458 #endif
457 459
458 DeregisterKillOnAlarm(); 460 DeregisterKillOnAlarm();
459 #endif 461 #endif
460 } 462 }
461 463
462 } // namespace shell 464 } // namespace shell
463 } // namespace chromecast 465 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698