gl-renderer: Attach buffer during surface state creation if possible
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 19 Nov 2013 13:22:05 +0000 (15:22 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 19 Nov 2013 21:11:25 +0000 (13:11 -0800)
commit895b1fdcb2a4423fc1de281d9eb0df9b618e9a7a
treee2273c0e83d44c074642dbdddc9150d99263166f
parent65796816b951f11541311c2624e28f0881fec61d
gl-renderer: Attach buffer during surface state creation if possible

When a renderer switch happens, it is possible that when the surface
state is created, a buffer for the given surface is already available.
In that case, run the attach routine so that the pixel contents are
properly set. Otherwise, it would only be set when a new attach request
is made for that surface.

Also, change the drm backend so that it keeps the buffer reference in
the weston_surface when running with the pixman renderer. The pixman
renderer keeps a reference to it anyway, so it is never released
early.

This makes the renderer transition seamless, without leaving a black
screen as before.
src/compositor-drm.c
src/gl-renderer.c