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

Unified Diff: ui/ozone/platform/dri/dri_gpu_platform_support.h

Issue 905873003: [8/8][Ozone-Dri] Pass DRM FD to GPU process on hotplug event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@udl2.9-allow-ndd-to-handle-multiple-drm-devices
Patch Set: Rebased Created 5 years, 10 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
Index: ui/ozone/platform/dri/dri_gpu_platform_support.h
diff --git a/ui/ozone/platform/dri/dri_gpu_platform_support.h b/ui/ozone/platform/dri/dri_gpu_platform_support.h
index 2290955a13d65508593ef49395bc3e82a2613b96..0068f2078f9ff2df9fb85e24511a025f350b24a7 100644
--- a/ui/ozone/platform/dri/dri_gpu_platform_support.h
+++ b/ui/ozone/platform/dri/dri_gpu_platform_support.h
@@ -5,6 +5,8 @@
#ifndef UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_
#define UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_
+#include <map>
+
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
@@ -15,6 +17,7 @@
class SkBitmap;
namespace base {
+class FileDescriptor;
class FilePath;
class SingleThreadTaskRunner;
}
@@ -30,6 +33,7 @@ class DriSurfaceFactory;
class DriWindowDelegate;
class DriWindowDelegateManager;
class DriWrapper;
+class DriWrapperGenerator;
class DrmDeviceManager;
class NativeDisplayDelegateDri;
class ScreenManager;
@@ -43,7 +47,8 @@ class DriGpuPlatformSupport : public GpuPlatformSupport {
DrmDeviceManager* drm_device_manager,
DriWindowDelegateManager* window_manager,
ScreenManager* screen_manager,
- scoped_ptr<NativeDisplayDelegateDri> ndd);
+ scoped_ptr<NativeDisplayDelegateDri> ndd,
+ scoped_ptr<DriWrapperGenerator> wrapper_generator);
~DriGpuPlatformSupport() override;
void AddHandler(scoped_ptr<GpuPlatformSupport> handler);
@@ -76,19 +81,21 @@ class DriGpuPlatformSupport : public GpuPlatformSupport {
void OnDisableNativeDisplay(int64_t id);
void OnTakeDisplayControl();
void OnRelinquishDisplayControl();
- void OnAddGraphicsDevice(const base::FilePath& path);
+ void OnAddGraphicsDevice(const base::FilePath& path,
+ const base::FileDescriptor& fd);
void OnRemoveGraphicsDevice(const base::FilePath& path);
void SetIOTaskRunner(
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
IPC::Sender* sender_; // Not owned.
- scoped_refptr<DriWrapper> drm_;
DrmDeviceManager* drm_device_manager_; // Not owned.
DriWindowDelegateManager* window_manager_; // Not owned.
ScreenManager* screen_manager_; // Not owned.
+ std::map<base::FilePath, scoped_refptr<DriWrapper>> wrappers_;
scoped_ptr<NativeDisplayDelegateDri> ndd_;
+ scoped_ptr<DriWrapperGenerator> wrapper_generator_;
ScopedVector<GpuPlatformSupport> handlers_;
scoped_refptr<IPC::MessageFilter> filter_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;

Powered by Google App Engine
This is Rietveld 408576698