| Index: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h
|
| diff --git a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h
|
| index 21c314ed95e7aaa2d71e33aa730ae41ae7c10fe5..44d300ca40a6e34870d2a8819029f9cfdac03f5b 100644
|
| --- a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h
|
| +++ b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h
|
| @@ -5,25 +5,13 @@
|
| #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
|
| #define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
|
|
|
| -#include "base/memory/ref_counted.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
|
|
|
| -namespace base {
|
| -class FilePath;
|
| -class SingleThreadTaskRunner;
|
| -struct FileDescriptor;
|
| -}
|
| -
|
| namespace ui {
|
|
|
| -class DeviceManager;
|
| -class DisplayMode;
|
| -class DrmDevice;
|
| class DrmDeviceManager;
|
| -class DrmDisplaySnapshot;
|
| -class DrmDisplayMode;
|
| +class DrmDisplay;
|
| class ScreenManager;
|
|
|
| struct GammaRampRGBEntry;
|
| @@ -34,58 +22,34 @@ class DrmGpuDisplayManager {
|
| DrmDeviceManager* drm_device_manager);
|
| ~DrmGpuDisplayManager();
|
|
|
| - void InitializeIOTaskRunner(
|
| - const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
|
| -
|
| // Returns a list of the connected displays. When this is called the list of
|
| // displays is refreshed.
|
| std::vector<DisplaySnapshot_Params> GetDisplays();
|
|
|
| - bool ConfigureDisplay(int64_t id,
|
| - const DisplayMode_Params& mode,
|
| - const gfx::Point& origin);
|
| - bool DisableDisplay(int64_t id);
|
| -
|
| // Takes/releases the control of the DRM devices.
|
| bool TakeDisplayControl();
|
| bool RelinquishDisplayControl();
|
|
|
| - // Called on DRM hotplug events to add/remove a DRM device.
|
| - void AddGraphicsDevice(const base::FilePath& path,
|
| - const base::FileDescriptor& fd);
|
| - void RemoveGraphicsDevice(const base::FilePath& path);
|
| -
|
| + bool ConfigureDisplay(int64_t id,
|
| + const DisplayMode_Params& mode,
|
| + const gfx::Point& origin);
|
| + bool DisableDisplay(int64_t id);
|
| bool GetHDCPState(int64_t display_id, HDCPState* state);
|
| bool SetHDCPState(int64_t display_id, HDCPState state);
|
| -
|
| - // Set the gamma ramp for a particular display id.
|
| void SetGammaRamp(int64_t id, const std::vector<GammaRampRGBEntry>& lut);
|
|
|
| private:
|
| - DrmDisplaySnapshot* FindDisplaySnapshot(int64_t id);
|
| - const DrmDisplayMode* FindDisplayMode(const gfx::Size& size,
|
| - bool is_interlaced,
|
| - float refresh_rate);
|
| -
|
| - void RefreshDisplayList();
|
| - bool Configure(const DrmDisplaySnapshot& output,
|
| - const DrmDisplayMode* mode,
|
| - const gfx::Point& origin);
|
| + DrmDisplay* FindDisplay(int64_t display_id);
|
|
|
| // Notify ScreenManager of all the displays that were present before the
|
| // update but are gone after the update.
|
| - void NotifyScreenManager(
|
| - const std::vector<DrmDisplaySnapshot*>& new_displays,
|
| - const std::vector<DrmDisplaySnapshot*>& old_displays) const;
|
| + void NotifyScreenManager(const std::vector<DrmDisplay*>& new_displays,
|
| + const std::vector<DrmDisplay*>& old_displays) const;
|
|
|
| ScreenManager* screen_manager_; // Not owned.
|
| DrmDeviceManager* drm_device_manager_; // Not owned.
|
| - scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
|
| - std::vector<scoped_refptr<DrmDevice>> devices_;
|
| - // Modes can be shared between different displays, so we need to keep track
|
| - // of them independently for cleanup.
|
| - ScopedVector<const DisplayMode> cached_modes_;
|
| - ScopedVector<DrmDisplaySnapshot> cached_displays_;
|
| +
|
| + ScopedVector<DrmDisplay> displays_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager);
|
| };
|
|
|