DSDisplayDeviceHWCTDMImpl: add LCOV exceptions 55/243455/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 2 Sep 2020 05:52:41 +0000 (14:52 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 7 Sep 2020 10:35:44 +0000 (19:35 +0900)
Change-Id: I09abcc5167dc47655349416069b56273d261810f

src/DSDisplayDevice/DSDisplayDeviceHWCTDMImpl.cpp
src/DSDisplayDevice/DSDisplayDeviceHWCWindowTDMTargetImpl.cpp

index b6be04f..2355e11 100644 (file)
@@ -52,7 +52,9 @@ std::shared_ptr<IDSBufferQueue> DSDisplayDeviceHWCTDMImpl::getTargetBufferQueue(
 
        tqueue = tdm_hwc_get_client_target_buffer_queue(__thwc, &terror);
        if (terror != TDM_ERROR_NONE) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("HWCTDM", "tdm_hwc_get_client_target_buffer_queue fails.");
+/*LCOV_EXCL_STOP*/
        }
 
        __bufferQueue = std::make_shared<DSBufferQueueTBMImpl>(tqueue);
@@ -70,8 +72,10 @@ bool DSDisplayDeviceHWCTDMImpl::setTargetBuffer(std::shared_ptr<IDSBuffer> buffe
 
        terror = tdm_hwc_set_client_target_buffer(__thwc, (tbm_surface_h)buffer->getNativeBuffer(), fb_damage);
        if (terror != TDM_ERROR_NONE) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("TDM_HWC", "tdm_hwc_set_client_target_buffer fails.");
                return false;
+/*LCOV_EXCL_STOP*/
        }
 
        return true;
@@ -85,14 +89,18 @@ std::shared_ptr<IDSDisplayDeviceHWCWindow> DSDisplayDeviceHWCTDMImpl::makeHWCWin
 
        twindow = tdm_hwc_create_window(__thwc, &terror);
        if (!twindow) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("HWCTDM", "tdm_hwc_create_window fails.");
                return nullptr;
+/*LCOV_EXCL_STOP*/
        }
 
        deviceHWCWindow = std::make_shared<DSDisplayDeviceHWCWindowTDMImpl>(twindow);
        if (!deviceHWCWindow) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("HWCTDM", "new DSDisplayDeviceHWCWindowTDMImpl fails.");
                return nullptr;
+/*LCOV_EXCL_STOP*/
        }
 
        return deviceHWCWindow;
@@ -152,9 +160,11 @@ bool DSDisplayDeviceHWCTDMImpl::commit()
        //TODO: commit with async
        terror = tdm_hwc_commit(__thwc, true, NULL, NULL);
        if (terror != TDM_ERROR_NONE) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("HWCTDM", "tdm_hwc_commit fails.");
                __presentFrameDoneWindows();
                return false;
+/*LCOV_EXCL_STOP*/
        }
 
        DSLOG_INF("HWCTDM", "HWC COMMIT COMMIT COMMIT ~#######");
@@ -186,9 +196,11 @@ bool DSDisplayDeviceHWCTDMImpl::__validate(uint32_t &numChanges)
        // validate thwc_windows
        terror = tdm_hwc_validate(__thwc, thwc_windows, numVisibleHWCWins, &numChanges);
        if (terror != TDM_ERROR_NONE) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("TDM_HWC", "tdm_hwc_validate fails.");
                free(thwc_windows);
                return false;
+/*LCOV_EXCL_STOP*/
        }
 
        free(thwc_windows);
@@ -242,8 +254,10 @@ bool DSDisplayDeviceHWCTDMImpl::__acceptValidation()
        // TODO: accept_validation is depending on the transitions.
        terror =  tdm_hwc_accept_validation(__thwc);
        if (terror != TDM_ERROR_NONE) {
+/*LCOV_EXCL_STOP*/
                DSLOG_ERR("TDM_HWC", "tdm_hwc_accept_validation fails.");
                return false;
+/*LCOV_EXCL_STOP*/
        }
 
        return true;
index 37269ec..fc67c7c 100644 (file)
@@ -34,7 +34,9 @@ DSDisplayDeviceHWCWindowTDMTargetImpl::DSDisplayDeviceHWCWindowTDMTargetImpl(IDS
          __ecoreFdHandler(nullptr)
 {
        if (!ecore_init()) {
+/*LCOV_EXCL_START*/
                DSLOG_ERR("EventLoop", "ecore_init() fails.");
+/*LCOV_EXCL_STOP*/
        }
 
        __eventFd = eventfd(0, EFD_NONBLOCK);
@@ -93,6 +95,7 @@ void DSDisplayDeviceHWCWindowTDMTargetImpl::onPresentFrameDone()
 
 Eina_Bool DSDisplayDeviceHWCWindowTDMTargetImpl::__onFdHandler(void *data, Ecore_Fd_Handler *hdlr)
 {
+/*LCOV_EXCL_START*/
        int len;
        int fd;
        char buffer[64];
@@ -106,6 +109,7 @@ Eina_Bool DSDisplayDeviceHWCWindowTDMTargetImpl::__onFdHandler(void *data, Ecore
                DSLOG_WRN("DSDisplayDeviceHWCWindowTDMTargetImpl", "failed to read buffer from event fd:%m");
 
        return ECORE_CALLBACK_RENEW;
+/*LCOV_EXCL_STOP*/
 }
 
 void DSDisplayDeviceHWCWindowTDMTargetImpl::__onAcquirable(void *data)
@@ -114,8 +118,12 @@ void DSDisplayDeviceHWCWindowTDMTargetImpl::__onAcquirable(void *data)
        int ret;
 
        ret = write(__eventFd, &value, sizeof(value));
-       if (ret == -1)
+       if (ret == -1) {
+/*LCOV_EXCL_START*/
                DSLOG_WRN("DSDisplayDeviceHWCWindowTDMTargetImpl", "failed to write a value on event fd:%m");
+/*LCOV_EXCL_STOP*/
+       }
+
 }
 
 }