queue: added TBM_SURFACE_QUEUE_ERROR_INVALID_SEQUENCE 50/186750/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Aug 2018 05:42:32 +0000 (14:42 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Aug 2018 05:55:06 +0000 (14:55 +0900)
Change-Id: I3e94ff083fc0ee65e5bdbed965c5f1b39bee7abd

include/tbm_type_common.h
src/tbm_surface_queue.c

index 1b8ab30..8f43737 100644 (file)
@@ -125,6 +125,7 @@ typedef enum {
        TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED = TBM_ERROR_BASE | 0x0304,   /**< Allocation of surface failed */
        TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST = TBM_ERROR_BASE | 0x0305,              /**< Already existed surface */
        TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE = TBM_ERROR_BASE | 0x0306,            /**< Unknown surface */
+       TBM_SURFACE_QUEUE_ERROR_INVALID_SEQUENCE = TBM_ERROR_BASE | 0x0307,       /**< Invalid sequence */
 } tbm_error_e;
 
 typedef tbm_error_e tbm_surface_queue_error_e;
index de15fda..ff52166 100644 (file)
@@ -1127,11 +1127,11 @@ tbm_surface_queue_enqueue(tbm_surface_queue_h
 
        if (!_queue_get_node(surface_queue, DIRTY_QUEUE, surface, NULL)) {
                TBM_ERR("enqueue surface(%p) but surface isn't present in the dirty_queue\n", surface);
-               _tbm_set_last_result(TBM_SURFACE_ERROR_INVALID_OPERATION);
+               _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SEQUENCE);
                pthread_mutex_unlock(&surface_queue->lock);
 
                _tbm_surf_queue_mutex_unlock();
-               return TBM_SURFACE_ERROR_INVALID_OPERATION;
+               return TBM_SURFACE_QUEUE_ERROR_INVALID_SEQUENCE;
        }
 
        node->type = QUEUE_NODE_TYPE_ENQUEUE;