mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Implement DRM overlay composition
This allows overlays to work on drivers that only have one usable overlay plane and when we are using the primary plane (which often must be exactly CRTC-sized) to overlay on top of a video underlay.
This commit is contained in:
@@ -649,6 +649,10 @@ private:
|
||||
bool mapSoftwareFrame(AVFrame* frame, AVDRMFrameDescriptor* mappedFrame);
|
||||
bool addFbForFrame(AVFrame* frame, uint32_t* newFbId, bool testMode);
|
||||
bool uploadSurfaceToFb(SDL_Surface *surface, uint32_t* handle, uint32_t* fbId);
|
||||
bool mapDumbBuffer(uint32_t handle, size_t size, void** mapping);
|
||||
bool createFbForDumbBuffer(struct drm_mode_create_dumb* createBuf, uint32_t* fbId);
|
||||
void enterOverlayCompositionMode();
|
||||
void blitOverlayToCompositionSurface(Overlay::OverlayType type, SDL_Surface* newSurface, SDL_Rect* overlayRect);
|
||||
static bool drmFormatMatchesVideoFormat(uint32_t drmFormat, int videoFormat);
|
||||
|
||||
IFFmpegRenderer* m_BackendRenderer;
|
||||
@@ -672,6 +676,8 @@ private:
|
||||
uint64_t m_VideoPlaneZpos;
|
||||
DrmPropertyMap m_OverlayPlanes[Overlay::OverlayMax];
|
||||
DrmPropertySetter m_PropSetter;
|
||||
SDL_Surface* m_OverlayCompositionSurface;
|
||||
std::mutex m_OverlayLock;
|
||||
SDL_Rect m_OverlayRects[Overlay::OverlayMax];
|
||||
drmVersionPtr m_Version;
|
||||
uint32_t m_HdrOutputMetadataBlobId;
|
||||
|
||||
Reference in New Issue
Block a user