[client] egl: implemented SPICE display support

This commit is contained in:
Geoffrey McRae
2022-05-22 18:19:58 +10:00
parent 6699018ed1
commit 247e867f18
17 changed files with 273 additions and 86 deletions

View File

@@ -50,10 +50,15 @@ typedef struct EGL_TexUpdate
union
{
/* EGL_TEXTURE_BUFFER */
const uint8_t * buffer;
/* EGL_TEXTYPE_BUFFER */
struct
{
// true if row 0 is the top of the image
bool topDown;
const uint8_t * buffer;
};
/* EGL_TEXTURE_FRAMEBUFFER */
/* EGL_TEXTYPE_FRAMEBUFFER */
struct
{
const FrameBuffer * frame;
@@ -61,7 +66,7 @@ typedef struct EGL_TexUpdate
int rectCount;
};
/* EGL_TEXTURE_DMABUF */
/* EGL_TEXTYPE_DMABUF */
int dmaFD;
};
}
@@ -72,7 +77,7 @@ typedef struct EGL_Texture EGL_Texture;
typedef struct EGL_TextureOps
{
/* allocate & initialize an EGL_Texture */
bool (*init)(EGL_Texture ** texture, EGLDisplay * display);
bool (*init)(EGL_Texture ** texture, EGL_TexType type, EGLDisplay * display);
/* free the EGL_Texture */
void (*free)(EGL_Texture * texture);
@@ -94,23 +99,25 @@ EGL_TextureOps;
struct EGL_Texture
{
struct EGL_TextureOps ops;
EGL_TexType type;
GLuint sampler;
EGL_TexFormat format;
};
bool egl_textureInit(EGL_Texture ** texture, EGLDisplay * display,
EGL_TexType type, bool streaming);
EGL_TexType type);
void egl_textureFree(EGL_Texture ** tex);
bool egl_textureSetup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt,
size_t width, size_t height, size_t stride);
bool egl_textureUpdate(EGL_Texture * texture, const uint8_t * buffer);
bool egl_textureUpdate(EGL_Texture * texture, const uint8_t * buffer,
bool topDown);
bool egl_textureUpdateRect(EGL_Texture * texture,
int x, int y, int width, int height, int stride,
const uint8_t * buffer);
const uint8_t * buffer, bool topDown);
bool egl_textureUpdateFromFrame(EGL_Texture * texture,
const FrameBuffer * frame, const FrameDamageRect * damageRects,