Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 56 | public: | |||
---|---|---|---|---|---|
72 | 72 | | |||
73 | /** | 73 | /** | ||
74 | * This sets the changes and tests them against the DRM output | 74 | * This sets the changes and tests them against the DRM output | ||
75 | */ | 75 | */ | ||
76 | void setChanges(KWayland::Server::OutputChangeSet *changeset); | 76 | void setChanges(KWayland::Server::OutputChangeSet *changeset); | ||
77 | bool commitChanges(); | 77 | bool commitChanges(); | ||
78 | 78 | | |||
79 | QSize size() const; | 79 | QSize size() const; | ||
80 | qreal scale() const; | ||||
80 | QRect geometry() const; | 81 | QRect geometry() const; | ||
81 | QString name() const; | 82 | QString name() const; | ||
82 | int currentRefreshRate() const; | 83 | int currentRefreshRate() const; | ||
83 | // These values are defined by the kernel | 84 | // These values are defined by the kernel | ||
84 | enum class DpmsMode { | 85 | enum class DpmsMode { | ||
85 | On = DRM_MODE_DPMS_ON, | 86 | On = DRM_MODE_DPMS_ON, | ||
86 | Standby = DRM_MODE_DPMS_STANDBY, | 87 | Standby = DRM_MODE_DPMS_STANDBY, | ||
87 | Suspend = DRM_MODE_DPMS_SUSPEND, | 88 | Suspend = DRM_MODE_DPMS_SUSPEND, | ||
Show All 18 Lines | 103 | private: | |||
106 | bool presentAtomically(DrmBuffer *buffer); | 107 | bool presentAtomically(DrmBuffer *buffer); | ||
107 | bool presentLegacy(DrmBuffer *buffer); | 108 | bool presentLegacy(DrmBuffer *buffer); | ||
108 | bool setModeLegacy(DrmBuffer *buffer); | 109 | bool setModeLegacy(DrmBuffer *buffer); | ||
109 | void initEdid(drmModeConnector *connector); | 110 | void initEdid(drmModeConnector *connector); | ||
110 | void initDpms(drmModeConnector *connector); | 111 | void initDpms(drmModeConnector *connector); | ||
111 | bool isCurrentMode(const drmModeModeInfo *mode) const; | 112 | bool isCurrentMode(const drmModeModeInfo *mode) const; | ||
112 | void initUuid(); | 113 | void initUuid(); | ||
113 | void setGlobalPos(const QPoint &pos); | 114 | void setGlobalPos(const QPoint &pos); | ||
115 | void setScale(qreal scale); | ||||
114 | 116 | | |||
115 | void pageFlippedBufferRemover(DrmBuffer *oldbuffer, DrmBuffer *newbuffer); | 117 | void pageFlippedBufferRemover(DrmBuffer *oldbuffer, DrmBuffer *newbuffer); | ||
116 | bool initPrimaryPlane(); | 118 | bool initPrimaryPlane(); | ||
117 | bool initCursorPlane(); | 119 | bool initCursorPlane(); | ||
118 | DrmObject::AtomicReturn atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable); | 120 | DrmObject::AtomicReturn atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable); | ||
119 | 121 | | |||
120 | DrmBackend *m_backend; | 122 | DrmBackend *m_backend; | ||
121 | QPoint m_globalPos; | 123 | QPoint m_globalPos; | ||
124 | qreal m_scale = 1; | ||||
122 | quint32 m_crtcId = 0; | 125 | quint32 m_crtcId = 0; | ||
123 | quint32 m_connector = 0; | 126 | quint32 m_connector = 0; | ||
124 | quint32 m_lastStride = 0; | 127 | quint32 m_lastStride = 0; | ||
125 | bool m_lastGbm = false; | 128 | bool m_lastGbm = false; | ||
126 | drmModeModeInfo m_mode; | 129 | drmModeModeInfo m_mode; | ||
127 | DrmBuffer *m_currentBuffer = nullptr; | 130 | DrmBuffer *m_currentBuffer = nullptr; | ||
128 | DrmBuffer *m_nextBuffer = nullptr; | 131 | DrmBuffer *m_nextBuffer = nullptr; | ||
129 | DrmBuffer *m_blackBuffer = nullptr; | 132 | DrmBuffer *m_blackBuffer = nullptr; | ||
Show All 28 Lines |