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

Unified Diff: ui/ozone/platform/dri/gbm_surface_factory.cc

Issue 955013002: Use the DrmDeviceManager to get the primary device in GbmSurfaceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.h ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/gbm_surface_factory.cc
diff --git a/ui/ozone/platform/dri/gbm_surface_factory.cc b/ui/ozone/platform/dri/gbm_surface_factory.cc
index cc7260f2f14a9104c004bd50521def33f5ffc848..9742541322c3c31aeaecade8db9277aef8d529f2 100644
--- a/ui/ozone/platform/dri/gbm_surface_factory.cc
+++ b/ui/ozone/platform/dri/gbm_surface_factory.cc
@@ -75,26 +75,20 @@ GbmSurfaceFactory::GbmSurfaceFactory(bool allow_surfaceless)
GbmSurfaceFactory::~GbmSurfaceFactory() {}
void GbmSurfaceFactory::InitializeGpu(
- const scoped_refptr<GbmWrapper>& gbm,
DrmDeviceManager* drm_device_manager,
DriWindowDelegateManager* window_manager) {
- gbm_ = gbm;
drm_device_manager_ = drm_device_manager;
window_manager_ = window_manager;
}
intptr_t GbmSurfaceFactory::GetNativeDisplay() {
-#if defined(USE_MESA_PLATFORM_NULL)
return EGL_DEFAULT_DISPLAY;
-#else
- DCHECK(gbm_);
- return reinterpret_cast<intptr_t>(gbm_->device());
-#endif
}
int GbmSurfaceFactory::GetDrmFd() {
- DCHECK(gbm_);
- return gbm_->get_fd();
+ scoped_refptr<GbmWrapper> gbm = GetGbmDevice(gfx::kNullAcceleratedWidget);
+ DCHECK(gbm);
+ return gbm->get_fd();
}
const int32* GbmSurfaceFactory::GetEGLSurfaceProperties(
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.h ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698