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

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: rebased Created 5 years, 4 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/drm/common/drm_util.cc ('k') | ui/ozone/platform/drm/host/drm_display_host_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..93e7793a00739c955230265bc6dafaf3db652fa6 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
@@ -39,11 +39,11 @@ 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.
+ // Using surfaceless is convenient because we don't need to ensure the primary
+ // drm device has been added by the host at the time this is called.
+ return EGL_DEFAULT_DISPLAY;
}
const int32* GbmSurfaceFactory::GetEGLSurfaceProperties(
« no previous file with comments | « ui/ozone/platform/drm/common/drm_util.cc ('k') | ui/ozone/platform/drm/host/drm_display_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698