From 1fcda6e9ab97412648543a5cdb344f652efd4c18 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Thu, 16 Feb 2017 21:08:21 +0900 Subject: [PATCH] tbm_surface_queue: added function tbm_surface_queue_notify_reset - e20 need to call only reset_cb of queue in reserved memory target. Change-Id: If4237e796b37d8dc7f65abd6e894b5149143bef4 --- src/tbm_surface_queue.c | 15 +++++++++++++++ src/tbm_surface_queue.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/tbm_surface_queue.c b/src/tbm_surface_queue.c index ebb29a3..be43358 100644 --- a/src/tbm_surface_queue.c +++ b/src/tbm_surface_queue.c @@ -1278,6 +1278,21 @@ tbm_surface_queue_reset(tbm_surface_queue_h return TBM_SURFACE_QUEUE_ERROR_NONE; } +tbm_surface_queue_error_e +tbm_surface_queue_notify_reset(tbm_surface_queue_h surface_queue) +{ + _tbm_surf_queue_mutex_lock(); + + TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), + TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE); + + _tbm_surf_queue_mutex_unlock(); + + _notify_emit(surface_queue, &surface_queue->reset_noti); + + return TBM_SURFACE_QUEUE_ERROR_NONE; +} + tbm_surface_queue_error_e tbm_surface_queue_set_size(tbm_surface_queue_h surface_queue, int queue_size, int flush) diff --git a/src/tbm_surface_queue.h b/src/tbm_surface_queue.h index 75ad642..e684982 100644 --- a/src/tbm_surface_queue.h +++ b/src/tbm_surface_queue.h @@ -94,6 +94,8 @@ tbm_surface_queue_error_e tbm_surface_queue_set_size( tbm_surface_queue_error_e tbm_surface_queue_flush(tbm_surface_queue_h surface_queue); +tbm_surface_queue_error_e tbm_surface_queue_notify_reset(tbm_surface_queue_h surface_queue); + tbm_surface_queue_error_e tbm_surface_queue_add_reset_cb( tbm_surface_queue_h surface_queue, tbm_surface_queue_notify_cb reset_cb, void *data); -- 2.34.1