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

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 1043233003: ozone: Add post message loop initialization hook (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: return without failing 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 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 "ui/ozone/platform/drm/ozone_platform_gbm.h" 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gbm.h> 8 #include <gbm.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 screen_manager_.reset(new ScreenManager(buffer_generator_.get())); 185 screen_manager_.reset(new ScreenManager(buffer_generator_.get()));
186 // This makes sure that simple targets that do not handle display 186 // This makes sure that simple targets that do not handle display
187 // configuration can still use the primary display. 187 // configuration can still use the primary display.
188 ForceInitializationOfPrimaryDisplay(gbm_, screen_manager_.get()); 188 ForceInitializationOfPrimaryDisplay(gbm_, screen_manager_.get());
189 189
190 if (!surface_factory_ozone_) 190 if (!surface_factory_ozone_)
191 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 191 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
192 192
193 surface_factory_ozone_->InitializeGpu(drm_device_manager_.get(), 193 surface_factory_ozone_->InitializeGpu(drm_device_manager_.get(),
194 screen_manager_.get()); 194 screen_manager_.get());
195 }
196
197 void InitializeGpuPostMainLoop() override {
195 scoped_ptr<DrmGpuDisplayManager> ndd(new DrmGpuDisplayManager( 198 scoped_ptr<DrmGpuDisplayManager> ndd(new DrmGpuDisplayManager(
196 screen_manager_.get(), gbm_, 199 screen_manager_.get(), gbm_,
197 scoped_ptr<DrmDeviceGenerator>(new GbmDeviceGenerator()))); 200 scoped_ptr<DrmDeviceGenerator>(new GbmDeviceGenerator())));
198 gpu_platform_support_.reset(new DrmGpuPlatformSupport( 201 gpu_platform_support_.reset(new DrmGpuPlatformSupport(
199 drm_device_manager_.get(), screen_manager_.get(), ndd.Pass())); 202 drm_device_manager_.get(), screen_manager_.get(), ndd.Pass()));
200 } 203 }
201 204
202 private: 205 private:
203 // Objects in both processes. 206 // Objects in both processes.
204 bool use_surfaceless_; 207 bool use_surfaceless_;
(...skipping 30 matching lines...) Expand all
235 OzonePlatform* CreateOzonePlatformGbm() { 238 OzonePlatform* CreateOzonePlatformGbm() {
236 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 239 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
237 #if defined(USE_MESA_PLATFORM_NULL) 240 #if defined(USE_MESA_PLATFORM_NULL)
238 // Only works with surfaceless. 241 // Only works with surfaceless.
239 cmd->AppendSwitch(switches::kOzoneUseSurfaceless); 242 cmd->AppendSwitch(switches::kOzoneUseSurfaceless);
240 #endif 243 #endif
241 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 244 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
242 } 245 }
243 246
244 } // namespace ui 247 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/ozone_platform_drm.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698