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

Unified Diff: ui/ozone/demo/ozone_demo.cc

Issue 1043233003: ozone: Add post message loop initialization hook (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: ui/ozone/demo/ozone_demo.cc
diff --git a/ui/ozone/demo/ozone_demo.cc b/ui/ozone/demo/ozone_demo.cc
index 616bd9ffb9b0843683892c9fd73a17f1095d7f18..321693067074d54d421915370dfbbbb782925bd9 100644
--- a/ui/ozone/demo/ozone_demo.cc
+++ b/ui/ozone/demo/ozone_demo.cc
@@ -199,13 +199,15 @@ RendererFactory::~RendererFactory() {
bool RendererFactory::Initialize() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(kDisableGpu) &&
- gfx::GLSurface::InitializeOneOff() &&
- gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
- base::ThreadTaskRunnerHandle::Get())) {
- if (command_line->HasSwitch(switches::kOzoneUseSurfaceless)) {
- type_ = SURFACELESS_GL;
- } else {
- type_ = GL;
+ gfx::GLSurface::InitializeOneOff()) {
+ ui::OzonePlatform::InitializeForGPUPostMainLoop();
+ if (gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
+ base::ThreadTaskRunnerHandle::Get())) {
+ if (command_line->HasSwitch(switches::kOzoneUseSurfaceless)) {
+ type_ = SURFACELESS_GL;
+ } else {
+ type_ = GL;
+ }
}
} else {
type_ = SOFTWARE;

Powered by Google App Engine
This is Rietveld 408576698