Chromium Code Reviews| Index: ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h |
| diff --git a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h |
| index 340c430b15e151c57ea50018e3474f23c9f943e6..385f1b3982509a52faac1222fc073c2b90b0fe46 100644 |
| --- a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h |
| +++ b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h |
| @@ -9,7 +9,10 @@ |
| #include "base/callback.h" |
| #include "base/observer_list.h" |
| +#include "ui/display/types/display_constants.h" |
| #include "ui/gfx/native_widget_types.h" |
| +#include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
| +#include "ui/ozone/platform/drm/host/gpu_thread_adapter.h" |
| #include "ui/ozone/public/gpu_platform_support_host.h" |
| class SkBitmap; |
| @@ -21,21 +24,23 @@ class Point; |
| namespace ui { |
| class DrmCursor; |
| +class DrmDisplayHostMananger; |
| +class DrmOverlayManager; |
| class GpuThreadObserver; |
| class DrmGpuPlatformSupportHost : public GpuPlatformSupportHost, |
| + public GpuThreadAdapter, |
| public IPC::Sender { |
| public: |
| DrmGpuPlatformSupportHost(DrmCursor* cursor); |
| ~DrmGpuPlatformSupportHost() override; |
| - void RegisterHandler(GpuPlatformSupportHost* handler); |
| - void UnregisterHandler(GpuPlatformSupportHost* handler); |
| + // void RegisterHandler(GpuPlatformSupportHost* handler); |
|
dnicoara
2016/02/03 14:54:30
nit: Remove these.
rjkroege
2016/02/04 00:09:40
Done.
|
| + // void UnregisterHandler(GpuPlatformSupportHost* handler); |
| - void AddGpuThreadObserver(GpuThreadObserver* observer); |
| - void RemoveGpuThreadObserver(GpuThreadObserver* observer); |
| - |
| - bool IsConnected(); |
| + void AddGpuThreadObserver(GpuThreadObserver* observer) override; |
|
dnicoara
2016/02/03 14:54:30
nit: Could you move these with the other functions
rjkroege
2016/02/04 00:09:40
Done.
|
| + void RemoveGpuThreadObserver(GpuThreadObserver* observer) override; |
| + bool IsConnected() override; |
| // GpuPlatformSupportHost: |
| void OnChannelEstablished( |
| @@ -50,13 +55,67 @@ class DrmGpuPlatformSupportHost : public GpuPlatformSupportHost, |
| // IPC::Sender: |
| bool Send(IPC::Message* message) override; |
| + // GpuThreadAdapter. |
| + // Services needed for DrmDisplayHostMananger. |
| + void RegisterHandlerForDrmDisplayHostManager( |
| + DrmDisplayHostManager* handler) override; |
| + void UnRegisterHandlerForDrmDisplayHostManager() override; |
| + |
| + bool GpuTakeDisplayControl() override; |
| + bool GpuRefreshNativeDisplays() override; |
| + bool GpuRelinquishDisplayControl() override; |
| + bool GpuAddGraphicsDevice(const base::FilePath& path, |
| + base::FileDescriptor fd) override; |
| + bool GpuRemoveGraphicsDevice(const base::FilePath& path) override; |
| + |
| + // Methods needed for DrmOverlayManager. |
| + // Methods for DrmOverlayManager. |
| + void RegisterHandlerForDrmOverlayManager(DrmOverlayManager* handler) override; |
| + void UnRegisterHandlerForDrmOverlayManager() override; |
| + |
| + // Services needed by DrmOverlayManager |
| + bool GpuCheckOverlayCapabilities( |
| + gfx::AcceleratedWidget widget, |
| + const std::vector<OverlayCheck_Params>& new_params) override; |
| + |
| + // Services needed by DrmDisplayHost |
| + bool GpuConfigureNativeDisplay(int64_t display_id, |
| + ui::DisplayMode_Params display_mode, |
| + gfx::Point point) override; |
| + bool GpuDisableNativeDisplay(int64_t display_id) override; |
| + bool GpuGetHDCPState(int64_t display_id) override; |
| + bool GpuSetHDCPState(int64_t display_id, ui::HDCPState state) override; |
| + bool GpuSetGammaRamp(int64_t display_id, |
| + const std::vector<GammaRampRGBEntry>& lut) override; |
| + |
| + // Services needed by DrmWindowHost |
| + bool GpuDestroyWindow(gfx::AcceleratedWidget widget) override; |
| + bool GpuCreateWindow(gfx::AcceleratedWidget widget) override; |
| + bool GpuWindowBoundsChanged(gfx::AcceleratedWidget widget, |
| + gfx::Rect bounds) override; |
| + |
| private: |
| + bool OnMessageReceivedForDrmDisplayHostManager(const IPC::Message& message); |
| + void OnUpdateNativeDisplays( |
| + const std::vector<DisplaySnapshot_Params>& displays); |
| + void OnDisplayConfigured(int64_t display_id, bool status); |
| + void OnHDCPStateReceived(int64_t display_id, bool status, HDCPState state); |
| + void OnHDCPStateUpdated(int64_t display_id, bool status); |
| + void OnTakeDisplayControl(bool status); |
| + void OnRelinquishDisplayControl(bool status); |
| + |
| + bool OnMessageReceivedForDrmOverlayManager(const IPC::Message& message); |
| + void OnOverlayResult(gfx::AcceleratedWidget widget, |
| + const std::vector<OverlayCheck_Params>& params); |
| + |
| int host_id_ = -1; |
| scoped_refptr<base::SingleThreadTaskRunner> send_runner_; |
| base::Callback<void(IPC::Message*)> send_callback_; |
| - std::vector<GpuPlatformSupportHost*> handlers_; // Not owned. |
| + DrmDisplayHostManager* host_manager_; // Not owned. |
|
dnicoara
2016/02/03 14:54:30
nit: Could this be display_host_manager_ or even d
rjkroege
2016/02/04 00:09:40
Done.
|
| + DrmOverlayManager* overlay_manager_; // Not owned. |
| + |
| DrmCursor* cursor_; // Not owned. |
| base::ObserverList<GpuThreadObserver> gpu_thread_observers_; |
| }; |