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

Unified Diff: ui/ozone/platform/drm/gpu/drm_device_manager.h

Issue 1124063003: drm: GPU process manages VGEM fd. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/common/gpu/ozone_gpu_messages.h ('k') | ui/ozone/platform/drm/gpu/drm_device_manager.cc » ('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_manager.h
diff --git a/ui/ozone/platform/drm/gpu/drm_device_manager.h b/ui/ozone/platform/drm/gpu/drm_device_manager.h
index 34fe61335d62cb1bb9165d8ef3d7ea0467130f68..8e74cde70f020b7da548f9b7672f15019a7a0e0d 100644
--- a/ui/ozone/platform/drm/gpu/drm_device_manager.h
+++ b/ui/ozone/platform/drm/gpu/drm_device_manager.h
@@ -8,6 +8,8 @@
#include <map>
#include <vector>
+#include "base/files/file_path.h"
+#include "base/files/scoped_file.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
@@ -16,7 +18,6 @@
#include "ui/ozone/ozone_export.h"
namespace base {
-class FilePath;
struct FileDescriptor;
class SingleThreadTaskRunner;
}
@@ -38,7 +39,9 @@ class OZONE_EXPORT DrmDeviceManager {
~DrmDeviceManager();
// The first device registered is assumed to be the primary device.
- bool AddDrmDevice(const base::FilePath& path, const base::FileDescriptor& fd);
+ bool AddDrmDevice(const base::FilePath& path,
+ const base::FileDescriptor& fd,
+ bool is_vgem);
void RemoveDrmDevice(const base::FilePath& path);
void InitializeIOTaskRunner(
@@ -57,6 +60,8 @@ class OZONE_EXPORT DrmDeviceManager {
const DrmDeviceVector& GetDrmDevices() const;
+ int GetVgemDevice() const;
dshwang 2015/05/11 13:25:33 This method is needed to implement zero/one-copy t
+
private:
// With the exception of GetDrmDevice() all functions must be called on GPU
// main.
@@ -78,6 +83,9 @@ class OZONE_EXPORT DrmDeviceManager {
// display; ie: when in headless mode).
scoped_refptr<DrmDevice> primary_device_;
+ base::ScopedFD vgem_device_;
+ base::FilePath vgem_path_;
+
// This class is accessed from the main thread and the IO thread. This lock
// protects access to the device map.
base::Lock lock_;
« no previous file with comments | « ui/ozone/common/gpu/ozone_gpu_messages.h ('k') | ui/ozone/platform/drm/gpu/drm_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698