[PATCH] Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.

Daniel Stone daniel at fooishbar.org
Thu May 23 09:47:01 PDT 2013


Hi,

On 23 May 2013 17:38, Sinclair Yeh <sinclair.yeh at intel.com> wrote:
> +               /* Only allocate a texture if it doesn't match existing one */
> +               if (((wl_shm_buffer_get_stride(buffer) / 4) != gs->pitch) ||
> +                   (buffer->height != gs->pitch)) {

It seems like this really should be a test against width rather than
pitch; also, you're comparing buffer->height to gs->pitch, rather than
gs->height.

Cheers,
Daniel


More information about the wayland-devel mailing list