OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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_DISPLAY_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "ui/display/types/display_constants.h" |
| 12 |
| 13 typedef struct _drmModeModeInfo drmModeModeInfo; |
| 14 |
| 15 namespace gfx { |
| 16 class Point; |
| 17 } |
| 18 |
| 19 namespace ui { |
| 20 |
| 21 class DrmDevice; |
| 22 class ScreenManager; |
| 23 |
| 24 struct GammaRampRGBEntry; |
| 25 |
| 26 class DrmDisplay { |
| 27 public: |
| 28 DrmDisplay(ScreenManager* screen_manager, |
| 29 int64_t display_id, |
| 30 const scoped_refptr<DrmDevice>& drm, |
| 31 uint32_t crtc, |
| 32 uint32_t connector, |
| 33 const std::vector<drmModeModeInfo>& modes); |
| 34 ~DrmDisplay(); |
| 35 |
| 36 int64_t display_id() const { return display_id_; } |
| 37 scoped_refptr<DrmDevice> drm() const { return drm_; } |
| 38 uint32_t crtc() const { return crtc_; } |
| 39 uint32_t connector() const { return connector_; } |
| 40 const std::vector<drmModeModeInfo>& modes() const { return modes_; } |
| 41 |
| 42 bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin); |
| 43 bool GetHDCPState(HDCPState* state); |
| 44 bool SetHDCPState(HDCPState state); |
| 45 void SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut); |
| 46 |
| 47 private: |
| 48 ScreenManager* screen_manager_; // Not owned. |
| 49 |
| 50 int64_t display_id_; |
| 51 scoped_refptr<DrmDevice> drm_; |
| 52 uint32_t crtc_; |
| 53 uint32_t connector_; |
| 54 std::vector<drmModeModeInfo> modes_; |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(DrmDisplay); |
| 57 }; |
| 58 |
| 59 } // namespace ui |
| 60 |
| 61 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_ |
OLD | NEW |