Index: ui/ozone/platform/drm/host/drm_device_handle.cc |
diff --git a/ui/ozone/platform/drm/host/drm_device_handle.cc b/ui/ozone/platform/drm/host/drm_device_handle.cc |
index 8d9fc0c53af256964ff95b8175229814145ae113..ccfceaa396dec491d1f001caba2ca84ab4527ab0 100644 |
--- a/ui/ozone/platform/drm/host/drm_device_handle.cc |
+++ b/ui/ozone/platform/drm/host/drm_device_handle.cc |
@@ -26,7 +26,7 @@ bool Authenticate(int fd) { |
} // namespace |
-DrmDeviceHandle::DrmDeviceHandle() { |
+DrmDeviceHandle::DrmDeviceHandle() : is_vgem_(false) { |
} |
DrmDeviceHandle::~DrmDeviceHandle() { |
@@ -34,9 +34,10 @@ DrmDeviceHandle::~DrmDeviceHandle() { |
base::ThreadRestrictions::AssertIOAllowed(); |
} |
-bool DrmDeviceHandle::Initialize(const base::FilePath& path) { |
+bool DrmDeviceHandle::Initialize(const base::FilePath& path, bool is_vgem) { |
CHECK(path.DirName() == base::FilePath("/dev/dri")); |
base::ThreadRestrictions::AssertIOAllowed(); |
+ is_vgem_ = is_vgem; |
bool print_warning = true; |
while (true) { |
file_.reset(); |
@@ -47,6 +48,8 @@ bool DrmDeviceHandle::Initialize(const base::FilePath& path) { |
} |
file_.reset(fd); |
+ if (is_vgem_) |
+ break; |
if (Authenticate(file_.get())) |
break; |