mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Export composed VA surface layers for EGL import if supported
Importing composed formats is more efficient and performant because it allows tiled and/or compressed surfaces to be directly sampled by shaders without requiring a conversion to a linear planar format first.
This commit is contained in:
@@ -14,12 +14,18 @@ class EglImageFactory
|
||||
public:
|
||||
EglImageFactory(IFFmpegRenderer* renderer);
|
||||
bool initializeEGL(EGLDisplay, const EGLExtensions &ext);
|
||||
|
||||
#ifdef HAVE_DRM
|
||||
ssize_t exportDRMImages(AVFrame* frame, AVDRMFrameDescriptor* drmFrame, EGLDisplay dpy, EGLImage images[EGL_MAX_PLANES]);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBVA
|
||||
ssize_t exportVAImages(AVFrame* frame, VADRMPRIMESurfaceDescriptor* vaFrame, EGLDisplay dpy, EGLImage images[EGL_MAX_PLANES]);
|
||||
#endif
|
||||
|
||||
bool supportsImportingFormat(EGLDisplay dpy, EGLint format);
|
||||
bool supportsImportingModifier(EGLDisplay dpy, EGLint format, EGLuint64KHR modifier);
|
||||
|
||||
void freeEGLImages(EGLDisplay dpy, EGLImage images[EGL_MAX_PLANES]);
|
||||
|
||||
private:
|
||||
@@ -29,4 +35,6 @@ private:
|
||||
PFNEGLDESTROYIMAGEPROC m_eglDestroyImage;
|
||||
PFNEGLCREATEIMAGEKHRPROC m_eglCreateImageKHR;
|
||||
PFNEGLDESTROYIMAGEKHRPROC m_eglDestroyImageKHR;
|
||||
PFNEGLQUERYDMABUFFORMATSEXTPROC m_eglQueryDmaBufFormatsEXT;
|
||||
PFNEGLQUERYDMABUFMODIFIERSEXTPROC m_eglQueryDmaBufModifiersEXT;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user