compositor: buffer can be non-NULL only if newly_attached
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 14 Mar 2014 12:38:12 +0000 (14:38 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 1 Apr 2014 23:46:40 +0000 (16:46 -0700)
commit260ba38fff92aa987a54945a238f2346736946d9
treebef2d383d09e542305cbe2364fc759e5186705df
parentbb2f3f2f919f153a384c3fd39090843e87dd5b80
compositor: buffer can be non-NULL only if newly_attached

There is no need for weston_subsurface_commit_to_cache() to leave the
pending.buffer set. Reset it to NULL.

This makes pending.buffer always NULL if pending.newly_attached == 0.
IOW, pending.buffer cannot be non-NULL unless
pending.newly_attached == 1.

Therefore no need to check pending.buffer nor cached.buffer_ref.buffer
for the weston_surface_attach() calls.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/compositor.c