gl-renderer: Track the buffer type in gl_surface_state
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 7 Jun 2013 13:52:44 +0000 (16:52 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 25 Jun 2013 20:05:12 +0000 (16:05 -0400)
commita9bf16157e2c50911f2086080db71851aea9beae
treedf7cbb192e51c35a54c14de9f96d7b33d08476c0
parent4c6ddf102c39544f8d5da60566bf9117911484a8
gl-renderer: Track the buffer type in gl_surface_state

Checking for gs->num_images for determining the previous buffer type
when attaching is not reliable. The number of images is never cleared
in the SHM path, so after a switch from an EGL buffer to SHM, every
following attach of an SHM buffer will happen with gs->num_images > 0,
and the code will assume the previous buffer was an EGL one.

Fix this by adding a buffer_type field to gl_surface_state.
src/gl-renderer.c