[client] egl: allow for partial texture updates

This commit is contained in:
Geoffrey McRae
2022-05-21 21:21:16 +10:00
parent 7ad3610276
commit 1fcdcc8725
4 changed files with 67 additions and 6 deletions

View File

@@ -42,6 +42,12 @@ typedef struct EGL_TexUpdate
/* the type of this update */
EGL_TexType type;
int x, y, width, height;
//pitch = row length in pixels
//stride = row length in bytes
int pitch, stride;
union
{
/* EGL_TEXTURE_BUFFER */
@@ -102,6 +108,10 @@ bool egl_textureSetup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt,
bool egl_textureUpdate(EGL_Texture * texture, const uint8_t * buffer);
bool egl_textureUpdateRect(EGL_Texture * texture,
int x, int y, int width, int height, int stride,
const uint8_t * buffer);
bool egl_textureUpdateFromFrame(EGL_Texture * texture,
const FrameBuffer * frame, const FrameDamageRect * damageRects,
int damageRectsCount);