mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] egl: RGB24 improvements
This patch performs several changes. * Alters the fourcc codes to types that ignore the alpha channel where possible to allow the gpu to internally use 24-bit formats. * Attempts to use DRM_FORMAT_RGB888 first as some GPUs may support this * If DMABUF is not in use the data is now imported directly as RGB24 without the post-processing shader
This commit is contained in:
@@ -92,7 +92,8 @@ typedef struct EGL_TextureOps
|
||||
enum EGL_TexStatus (*process)(EGL_Texture * texture);
|
||||
|
||||
/* get the texture for use */
|
||||
enum EGL_TexStatus (*get)(EGL_Texture * texture, GLuint * tex);
|
||||
enum EGL_TexStatus (*get)(EGL_Texture * texture, GLuint * tex,
|
||||
EGL_PixelFormat * fmt);
|
||||
|
||||
/* bind the texture for use */
|
||||
enum EGL_TexStatus (*bind)(EGL_Texture * texture);
|
||||
@@ -132,13 +133,15 @@ bool egl_textureUpdateFromDMA(EGL_Texture * texture,
|
||||
enum EGL_TexStatus egl_textureProcess(EGL_Texture * texture);
|
||||
|
||||
static inline EGL_TexStatus egl_textureGet(EGL_Texture * texture, GLuint * tex,
|
||||
unsigned int * sizeX, unsigned int * sizeY)
|
||||
unsigned int * sizeX, unsigned int * sizeY, EGL_PixelFormat * fmt)
|
||||
{
|
||||
if (sizeX)
|
||||
*sizeX = texture->format.width;
|
||||
if (sizeY)
|
||||
*sizeY = texture->format.height;
|
||||
return texture->ops.get(texture, tex);
|
||||
if (fmt)
|
||||
*fmt = texture->format.pixFmt;
|
||||
return texture->ops.get(texture, tex, fmt);
|
||||
}
|
||||
|
||||
enum EGL_TexStatus egl_textureBind(EGL_Texture * texture);
|
||||
|
Reference in New Issue
Block a user