tbm_surface_queue_enqueue/release: changed the check for success 10/147210/2
authorKonstantin Drabeniuk <k.drabeniuk@samsung.com>
Fri, 1 Sep 2017 11:04:09 +0000 (14:04 +0300)
committerKonstantin Drabeniuk <k.drabeniuk@samsung.com>
Fri, 1 Sep 2017 11:07:03 +0000 (14:07 +0300)
commit5488b91181e0a3defa8a2e42658c913220d92174
tree794fd681b7af1dd47db81fc92f6552117875cca4
parent4eaf3da1d29056e06c781c192cea656c5fb15dc5
tbm_surface_queue_enqueue/release: changed the check for success

Now when we enqueue the first surface(dirty queue is empty)
to queue we get the TBM_SURFACE_QUEUE_ERROR_EMPTY error if
the enqueue operation is failed(_tbm_surface_queue_enqueue() or
surface_queue->impl->enqueue() is failed). When we don't acquire the
first surface and enqueue the second surface (dirty queue is not empty)
to queue we don't get the TBM_SURFACE_QUEUE_ERROR_EMPTY error if
the enqueue operation is failed. I think we should check whether there is
a surface(which we try to enqueue) in the dirty_queue.

The same for the release operation.

Change-Id: I7027e7869419a2dc3c912465778ecde89a79aee3
Signed-off-by: Konstantin Drabeniuk <k.drabeniuk@samsung.com>
src/tbm_surface_queue.c