mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-09 16:18:20 +00:00
[client] egl: remove deprecated BGR members and logic
This commit is contained in:
parent
4aba15f31c
commit
3af2cf54d6
@ -196,7 +196,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
|
||||
for(int y = 0; y < update->height; ++y)
|
||||
{
|
||||
memcpy(dst, src, update->pitch);
|
||||
dst += texture->format.bufferPitch;
|
||||
dst += texture->format.pitch;
|
||||
src += update->pitch;
|
||||
}
|
||||
}
|
||||
@ -207,7 +207,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
|
||||
{
|
||||
src -= update->stride;
|
||||
memcpy(dst, src, update->stride);
|
||||
dst += texture->format.bufferPitch;
|
||||
dst += texture->format.pitch;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ static bool egl_texDMABUFUpdate(EGL_Texture * texture,
|
||||
EGL_LINUX_DRM_FOURCC_EXT , texture->format.fourcc,
|
||||
EGL_DMA_BUF_PLANE0_FD_EXT , update->dmaFD,
|
||||
EGL_DMA_BUF_PLANE0_OFFSET_EXT , 0,
|
||||
EGL_DMA_BUF_PLANE0_PITCH_EXT , texture->format.bufferPitch,
|
||||
EGL_DMA_BUF_PLANE0_PITCH_EXT , texture->format.pitch,
|
||||
EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, (modifier & 0xffffffff),
|
||||
EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, (modifier >> 32),
|
||||
EGL_NONE , EGL_NONE
|
||||
|
@ -86,16 +86,7 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
|
||||
if (!fmt->pitch)
|
||||
fmt->pitch = fmt->stride * fmt->bpp;
|
||||
|
||||
fmt->bufferPitch = setup->pitch;
|
||||
|
||||
// adjust the stride for 24-bit in 32-bit buffers
|
||||
// this is needed to keep values sane for DMABUF support
|
||||
// if (setup->pixFmt == EGL_PF_BGR)
|
||||
// fmt->bufferPitch = setup->width * 4;
|
||||
|
||||
fmt->dataSize = fmt->height * fmt->pitch;
|
||||
fmt->bufferSize = fmt->height * fmt->bufferPitch;
|
||||
|
||||
fmt->dataSize = fmt->height * fmt->pitch;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -106,12 +97,12 @@ bool egl_texUtilGenBuffers(const EGL_TexFormat * fmt, EGL_TexBuffer * buffers,
|
||||
{
|
||||
EGL_TexBuffer *buffer = &buffers[i];
|
||||
|
||||
buffer->size = fmt->bufferSize;
|
||||
buffer->size = fmt->dataSize;
|
||||
glGenBuffers(1, &buffer->pbo);
|
||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, buffer->pbo);
|
||||
g_egl_dynProcs.glBufferStorageEXT(
|
||||
GL_PIXEL_UNPACK_BUFFER,
|
||||
fmt->bufferSize,
|
||||
fmt->dataSize,
|
||||
NULL,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_PERSISTENT_BIT_EXT |
|
||||
|
@ -37,10 +37,6 @@ typedef struct EGL_TexFormat
|
||||
size_t dataSize;
|
||||
size_t width , height;
|
||||
size_t stride, pitch;
|
||||
|
||||
// for 24-bit BGR these are the physical adjusted values to get mapping working
|
||||
size_t bufferSize;
|
||||
size_t bufferPitch;
|
||||
}
|
||||
EGL_TexFormat;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user