Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index 648873d6c243ff38638dfb43e33d088dd150381f..d35871c41ae018fe0b44c6bf88489b504713329e 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -121,6 +121,8 @@ |
| #include "content/public/browser/screen_orientation_provider.h" |
| #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" |
| #include "media/base/android/media_client_android.h" |
| +#include "ui/android/screen_android.h" |
| +#include "ui/display/screen.h" |
| #include "ui/gl/gl_surface.h" |
| #endif |
| @@ -735,6 +737,11 @@ void BrowserMainLoop::PostMainMessageLoopStart() { |
| } |
| int BrowserMainLoop::PreCreateThreads() { |
| +#if defined(OS_ANDROID) |
| + // Let screen instance be overridable by parts. |
| + display::Screen::SetScreenInstance(ui::CreateScreenAndroid()); |
|
boliu
2016/11/11 19:54:48
linux puts this in PreMainMessageLoopRun
Tima Vaisburd
2016/11/11 21:32:25
Sometimes it is in PreCreateThreads, though under
boliu
2016/11/11 21:36:10
it hurts start up perf more
Tima Vaisburd
2016/11/11 23:44:43
Done.
The relevant tests seem to pass again.
|
| +#endif |
| + |
| if (parts_) { |
| TRACE_EVENT0("startup", |
| "BrowserMainLoop::CreateThreads:PreCreateThreads"); |