OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ |
| 7 |
| 8 #include "base/memory/scoped_vector.h" |
| 9 #include "ui/display/types/display_constants.h" |
| 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 class DrmDeviceManager; |
| 15 class DrmDisplay; |
| 16 class ScreenManager; |
| 17 |
| 18 struct GammaRampRGBEntry; |
| 19 |
| 20 class DrmGpuDisplayManager { |
| 21 public: |
| 22 DrmGpuDisplayManager(ScreenManager* screen_manager, |
| 23 DrmDeviceManager* drm_device_manager); |
| 24 ~DrmGpuDisplayManager(); |
| 25 |
| 26 // Returns a list of the connected displays. When this is called the list of |
| 27 // displays is refreshed. |
| 28 std::vector<DisplaySnapshot_Params> GetDisplays(); |
| 29 |
| 30 // Takes/releases the control of the DRM devices. |
| 31 bool TakeDisplayControl(); |
| 32 void RelinquishDisplayControl(); |
| 33 |
| 34 bool ConfigureDisplay(int64_t id, |
| 35 const DisplayMode_Params& mode, |
| 36 const gfx::Point& origin); |
| 37 bool DisableDisplay(int64_t id); |
| 38 bool GetHDCPState(int64_t display_id, HDCPState* state); |
| 39 bool SetHDCPState(int64_t display_id, HDCPState state); |
| 40 void SetGammaRamp(int64_t id, const std::vector<GammaRampRGBEntry>& lut); |
| 41 |
| 42 private: |
| 43 DrmDisplay* FindDisplay(int64_t display_id); |
| 44 |
| 45 // Notify ScreenManager of all the displays that were present before the |
| 46 // update but are gone after the update. |
| 47 void NotifyScreenManager(const std::vector<DrmDisplay*>& new_displays, |
| 48 const std::vector<DrmDisplay*>& old_displays) const; |
| 49 |
| 50 ScreenManager* screen_manager_; // Not owned. |
| 51 DrmDeviceManager* drm_device_manager_; // Not owned. |
| 52 |
| 53 ScopedVector<DrmDisplay> displays_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager); |
| 56 }; |
| 57 |
| 58 } // namespace ui |
| 59 |
| 60 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ |
OLD | NEW |