Chromium Code Reviews

Unified Diff: ui/ozone/platform/drm/gpu/gbm_surface_factory.cc

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
diff --git a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
index f4828611e091c488c31c746e28d23ec04b1509df..6b68ffd40d82a6e0570b19c425df76248e073694 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
@@ -39,11 +39,9 @@ void GbmSurfaceFactory::InitializeGpu(DrmDeviceManager* drm_device_manager,
intptr_t GbmSurfaceFactory::GetNativeDisplay() {
DCHECK(thread_checker_.CalledOnValidThread());
- auto primary_device = drm_device_manager_->GetDrmDevice(
- gfx::kNullAcceleratedWidget);
- DCHECK(primary_device.get());
- auto gbm_device = static_cast<GbmDevice*>(primary_device.get());
- return reinterpret_cast<EGLNativeDisplayType>(gbm_device->device());
+ // If using gbm surfaces, must return here the gbm device that corresponds
+ // to the primary drm device.
+ return EGL_DEFAULT_DISPLAY;
}
const int32* GbmSurfaceFactory::GetEGLSurfaceProperties(

Powered by Google App Engine