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

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

Issue 1124063003: drm: GPU process manages VGEM fd. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 5 years, 7 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/gpu/drm_device.h ('k') | ui/ozone/platform/drm/gpu/drm_device_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/drm_device.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc
index 69164431c257ea089585881872abb57d643c85fd..393d5e522ce05b6df97cc69590272a26cb94266c 100644
--- a/ui/ozone/platform/drm/gpu/drm_device.cc
+++ b/ui/ozone/platform/drm/gpu/drm_device.cc
@@ -268,20 +268,15 @@ class DrmDevice::IOWatcher
DISALLOW_COPY_AND_ASSIGN(IOWatcher);
};
-DrmDevice::DrmDevice(const base::FilePath& device_path)
- : device_path_(device_path),
- file_(device_path,
- base::File::FLAG_OPEN | base::File::FLAG_READ |
- base::File::FLAG_WRITE),
- page_flip_manager_(new PageFlipManager()) {
- LOG_IF(FATAL, !file_.IsValid())
- << "Failed to open '" << device_path_.value()
- << "': " << base::File::ErrorToString(file_.error_details());
+DrmDeviceBase::DrmDeviceBase(const base::FilePath& device_path, base::File file)
+ : device_path_(device_path), file_(file.Pass()) {
+}
+
+DrmDeviceBase::~DrmDeviceBase() {
}
DrmDevice::DrmDevice(const base::FilePath& device_path, base::File file)
- : device_path_(device_path),
- file_(file.Pass()),
+ : DrmDeviceBase(device_path, file.Pass()),
page_flip_manager_(new PageFlipManager()) {
}
@@ -321,6 +316,10 @@ void DrmDevice::InitializeTaskRunner(
new IOWatcher(file_.GetPlatformFile(), task_runner_, page_flip_manager_);
}
+DrmDeviceBase::Type DrmDevice::GetType() const {
+ return DRM;
+}
+
ScopedDrmCrtcPtr DrmDevice::GetCrtc(uint32_t crtc_id) {
DCHECK(file_.IsValid());
return ScopedDrmCrtcPtr(drmModeGetCrtc(file_.GetPlatformFile(), crtc_id));
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.h ('k') | ui/ozone/platform/drm/gpu/drm_device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698