tdm_layer: do not include coverage checking tdm_layer related APIs 60/233260/2
authorJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 13 May 2020 08:06:35 +0000 (17:06 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 13 May 2020 09:12:30 +0000 (18:12 +0900)
if hwc mode enabled, tdm_layer APIs are disabled.
so exclude layer relate APIs coverage checking because hwc mode is default on now.

Change-Id: I50b3a80061ae00c2c538b70eda276e899c92bbfc
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tdm_layer.c

index 6e0c1bf..b6f07f0 100644 (file)
@@ -93,6 +93,7 @@
                return; \
        }
 
+/* LCOV_EXCL_START */
 static void _tdm_layer_cb_wait_vblank(tdm_vblank *vblank, tdm_error error, unsigned int sequence,
                                                                          unsigned int tv_sec, unsigned int tv_usec, void *user_data);
 static void _tbm_layer_queue_acquirable_cb(tbm_surface_queue_h surface_queue, void *data);
@@ -236,11 +237,9 @@ tdm_layer_set_property(tdm_layer *layer, unsigned int id, tdm_value value)
        private_layer->usable = 0;
 
        if (!func_layer->layer_set_property) {
-               /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_STOP */
        }
 
        ret = func_layer->layer_set_property(private_layer->layer_backend, id, value);
@@ -267,11 +266,9 @@ tdm_layer_get_property(tdm_layer *layer, unsigned int id, tdm_value *value)
        func_layer = &private_module->func_layer;
 
        if (!func_layer->layer_get_property) {
-               /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_SOP */
        }
 
        ret = func_layer->layer_get_property(private_layer->layer_backend, id, value);
@@ -297,10 +294,8 @@ tdm_layer_set_info_internal(tdm_private_layer *private_layer, tdm_info_layer *in
        private_layer->usable = 0;
 
        if (!func_layer->layer_set_info) {
-               /* LCOV_EXCL_START */
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_STOP */
        }
 
        if (info->src_config.format)
@@ -359,11 +354,9 @@ tdm_layer_get_info(tdm_layer *layer, tdm_info_layer *info)
        func_layer = &private_module->func_layer;
 
        if (!func_layer->layer_get_info) {
-               /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_STOP */
        }
 
        ret = func_layer->layer_get_info(private_layer->layer_backend, info);
@@ -373,7 +366,6 @@ tdm_layer_get_info(tdm_layer *layer, tdm_info_layer *info)
        return ret;
 }
 
-/* LCOV_EXCL_START */
 static void
 _tdm_layer_dump_buffer(tdm_layer *layer, tbm_surface_h buffer)
 {
@@ -407,7 +399,6 @@ _tdm_layer_dump_buffer(tdm_layer *layer, tbm_surface_h buffer)
 
        return;
 }
-/* LCOV_EXCL_STOP */
 
 void
 tdm_layer_free_buffer(tdm_private_layer *private_layer, tdm_private_layer_buffer *layer_buffer)
@@ -509,7 +500,6 @@ tdm_layer_set_buffer_internal(tdm_private_layer *private_layer, tbm_surface_h bu
        tdm_private_output *private_output = private_layer->private_output;
        tdm_func_layer *func_layer;
 
-       /* LCOV_EXCL_START */
        /* dump buffer */
        if (tdm_dump_enable && !(private_layer->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO))
                _tdm_layer_dump_buffer(private_layer, buffer);
@@ -522,7 +512,6 @@ tdm_layer_set_buffer_internal(tdm_private_layer *private_layer, tbm_surface_h bu
                                 private_output->index, private_layer->index, i++);
                tdm_helper_dump_buffer_str(buffer, tdm_debug_dump_dir, str);
        }
-       /* LCOV_EXCL_STOP */
 
        private_module = private_layer->private_module;
        func_layer = &private_module->func_layer;
@@ -533,10 +522,8 @@ tdm_layer_set_buffer_internal(tdm_private_layer *private_layer, tbm_surface_h bu
        private_layer->usable = 0;
 
        if (!func_layer->layer_set_buffer) {
-               /* LCOV_EXCL_START */
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_START */
        }
 
        private_layer->pending_buffer_changed = 1;
@@ -609,10 +596,8 @@ tdm_layer_unset_buffer_internal(tdm_private_layer *private_layer)
                TDM_INFO("layer(%p,%d) now usable", private_layer, private_layer->index);
 
        if (!func_layer->layer_unset_buffer) {
-               /* LCOV_EXCL_START */
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_START */
        }
 
        ret = func_layer->layer_unset_buffer(private_layer->layer_backend);
@@ -644,7 +629,6 @@ tdm_layer_committed(tdm_private_layer *private_layer, tdm_private_layer_buffer *
        tdm_private_output *private_output = private_layer->private_output;
        tdm_private_display *private_display = private_output->private_display;
 
-       /* LCOV_EXCL_START */
        if (private_display->print_fps) {
                double curr = tdm_helper_get_time();
                if (private_layer->fps_stamp == 0) {
@@ -660,7 +644,6 @@ tdm_layer_committed(tdm_private_layer *private_layer, tdm_private_layer_buffer *
                private_layer->fps_stamp = 0;
                private_layer->fps_count = 0;
        }
-       /* LCOV_EXCL_STOP */
 
        if (private_layer->showing_buffer) {
                if (tdm_ttrace_module & TDM_TTRACE_LAYER) {
@@ -977,10 +960,8 @@ _tdm_layer_commit(tdm_layer *layer, tdm_layer_commit_handler func, void *user_da
 
        layer_commit_handler = calloc(1, sizeof(tdm_private_layer_commit_handler));
        if (!layer_commit_handler) {
-               /* LCOV_EXCL_START */
                TDM_ERR("failed: alloc memory");
                return TDM_ERROR_OUT_OF_MEMORY;
-               /* LCOV_EXCL_STOP */
        }
 
        if (tdm_debug_module & TDM_DEBUG_COMMIT)
@@ -1230,20 +1211,16 @@ _tbm_layer_queue_acquirable_cb(tbm_surface_queue_h surface_queue, void *data)
        func_layer = &private_module->func_layer;
 
        if (!func_layer->layer_set_buffer) {
-               /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                return;
-               /* LCOV_EXCL_STOP */
        }
 
        if (TBM_SURFACE_QUEUE_ERROR_NONE != tbm_surface_queue_acquire(private_layer->buffer_queue, &buffer) ||
                buffer == NULL) {
-               /* LCOV_EXCL_START */
                TDM_ERR("layer(%p,%d) tbm_surface_queue_acquire() failed surface:%p",
                                private_layer, private_layer->index, buffer);
                _pthread_mutex_unlock(&private_display->lock);
                return;
-               /* LCOV_EXCL_STOP */
        }
 
        ret = tdm_layer_set_buffer_internal(private_layer, buffer);
@@ -1302,11 +1279,9 @@ tdm_layer_set_buffer_queue(tdm_layer *layer, tbm_surface_queue_h buffer_queue)
        private_layer->usable = 0;
 
        if (!func_layer->layer_set_buffer) {
-               /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_ERR("not implemented!!");
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_STOP */
        }
 
        if (buffer_queue == private_layer->buffer_queue) {
@@ -1380,11 +1355,9 @@ tdm_layer_set_video_pos(tdm_layer *layer, int zpos)
        }
 
        if (!func_layer->layer_set_video_pos) {
-               /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_ERR("layer(%p,%d) not implemented!!", private_layer, private_layer->index);
                return TDM_ERROR_NOT_IMPLEMENTED;
-               /* LCOV_EXCL_STOP */
        }
 
        ret = func_layer->layer_set_video_pos(private_layer->layer_backend, zpos);
@@ -1428,12 +1401,10 @@ tdm_layer_get_buffer_flags(tdm_layer *layer, unsigned int *flags)
        func_layer = &private_module->func_layer;
 
        if (!func_layer->layer_get_buffer_flags) {
-               /* LCOV_EXCL_START */
                *flags = 0;
                _pthread_mutex_unlock(&private_display->lock);
                TDM_INFO("not implemented!!");
                return TDM_ERROR_NONE;
-               /* LCOV_EXCL_STOP */
        }
 
        ret = func_layer->layer_get_buffer_flags(private_layer->layer_backend, flags);
@@ -1442,3 +1413,4 @@ tdm_layer_get_buffer_flags(tdm_layer *layer, unsigned int *flags)
 
        return ret;
 }
+/* LCOV_EXCL_STOP */