@ -2158,13 +2158,16 @@ unsupported:
/* Only allocate a texture if it doesn't match existing one.
* If a switch from DRM allocated buffer to a SHM buffer is
* happening , we need to allocate a new texture buffer . */
if ( pitch ! = gb - > pitch | |
buffer - > height ! = gb - > height | |
gl_format [ 0 ] ! = gb - > gl_format [ 0 ] | |
gl_format [ 1 ] ! = gb - > gl_format [ 1 ] | |
gl_format [ 2 ] ! = gb - > gl_format [ 2 ] | |
gl_pixel_type ! = gb - > gl_pixel_type | |
gb - > buffer_type ! = BUFFER_TYPE_SHM ) {
if ( pitch = = gb - > pitch & &
buffer - > height = = gb - > height & &
gl_format [ 0 ] = = gb - > gl_format [ 0 ] & &
gl_format [ 1 ] = = gb - > gl_format [ 1 ] & &
gl_format [ 2 ] = = gb - > gl_format [ 2 ] & &
gl_pixel_type = = gb - > gl_pixel_type & &
gb - > buffer_type = = BUFFER_TYPE_SHM ) {
return true ;
}
gb - > pitch = pitch ;
gb - > height = buffer - > height ;
gb - > gl_format [ 0 ] = gl_format [ 0 ] ;
@ -2179,7 +2182,6 @@ unsupported:
gs - > surface = es ;
ensure_textures ( gs , GL_TEXTURE_2D , num_planes ) ;
}
return true ;
}