From: SooChan Lim Date: Thu, 2 Jul 2020 09:03:10 +0000 (+0900) Subject: DSDisplay: create the DSDisplayDeviceOutputTDMImpl at DSDisplayDeviceTDMImpl constructor. X-Git-Tag: accepted/tizen/unified/20200820.213435~310 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F241565%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git DSDisplay: create the DSDisplayDeviceOutputTDMImpl at DSDisplayDeviceTDMImpl constructor. Change-Id: Ic5a6cfa0787bff6f8ab0d9cbd4d901b88fad9279 --- diff --git a/src/DSDisplayDevice/DSDisplayDeviceTDMImpl.cpp b/src/DSDisplayDevice/DSDisplayDeviceTDMImpl.cpp index 66e35e5..2255542 100644 --- a/src/DSDisplayDevice/DSDisplayDeviceTDMImpl.cpp +++ b/src/DSDisplayDevice/DSDisplayDeviceTDMImpl.cpp @@ -9,43 +9,38 @@ DSDisplayDeviceTDMImpl::DSDisplayDeviceTDMImpl() : __numOutputs(0) { tdm_error terror; + tdm_output *toutput; + IDSDisplayDeviceOutput *deviceOutput; __tdisplay = tdm_display_init(&terror); if (terror != TDM_ERROR_NONE) { DSLOG_ERR("TDM DEVICE", "tdm_display_init fails.\n"); } -} - -DSDisplayDeviceTDMImpl::~DSDisplayDeviceTDMImpl() -{ - tdm_display_deinit(__tdisplay); -} - -std::list DSDisplayDeviceTDMImpl::getOutputList() -{ - tdm_error terror; - tdm_output *toutput; - IDSDisplayDeviceOutput *deviceOutput; terror = tdm_display_get_output_count(__tdisplay, &__numOutputs); if (__numOutputs <= 0) { DSLOG_ERR("TDM DEVICE", "tdm_display_get_output_count fails.\n"); - return __outputList; + return; } for (int i = 0; i < __numOutputs; ++i) { toutput = tdm_display_get_output(__tdisplay, i, &terror); if (terror != TDM_ERROR_NONE) { DSLOG_ERR("TDM DEVICE", "tdm_display_get_output fails.(output num: %d)\n", i); - return __outputList; + return; } deviceOutput = new DSDisplayDeviceOutputTDMImpl(toutput); __outputList.emplace_back(deviceOutput); - - // emit the output added signal - this->__outputAddedSignal.emit(deviceOutput); } +} +DSDisplayDeviceTDMImpl::~DSDisplayDeviceTDMImpl() +{ + tdm_display_deinit(__tdisplay); +} + +std::list DSDisplayDeviceTDMImpl::getOutputList() +{ return __outputList; }