mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Support underlay planes by turning off unused active planes
This commit is contained in:
@@ -189,6 +189,10 @@ class DrmRenderer : public IFFmpegRenderer {
|
||||
return m_ObjectType;
|
||||
}
|
||||
|
||||
const std::unordered_map<std::string, DrmProperty>& properties() const {
|
||||
return m_Props;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t m_ObjectId = 0;
|
||||
uint32_t m_ObjectType = 0;
|
||||
@@ -605,6 +609,17 @@ class DrmRenderer : public IFFmpegRenderer {
|
||||
return m_Atomic;
|
||||
}
|
||||
|
||||
void restoreToInitial(const DrmPropertyMap& object) {
|
||||
SDL_assert(m_Atomic);
|
||||
|
||||
// Set all mutable properties back to their initial values
|
||||
for (auto& prop : object.properties()) {
|
||||
if (!prop.second.isImmutable()) {
|
||||
set(prop.second, prop.second.initialValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
int m_Fd = -1;
|
||||
bool m_Atomic = false;
|
||||
@@ -668,6 +683,7 @@ private:
|
||||
DrmPropertyMap m_Encoder;
|
||||
DrmPropertyMap m_Connector;
|
||||
DrmPropertyMap m_Crtc;
|
||||
std::unordered_map<uint32_t, DrmPropertyMap> m_UnusedActivePlanes;
|
||||
DrmPropertyMap m_VideoPlane;
|
||||
uint64_t m_VideoPlaneZpos;
|
||||
DrmPropertyMap m_OverlayPlanes[Overlay::OverlayMax];
|
||||
|
||||
Reference in New Issue
Block a user