From: Roman Marchenko Date: Fri, 27 May 2016 13:12:07 +0000 (+0300) Subject: move a registration of commit_cb before calling output_commit X-Git-Tag: submit/tizen/20160603.013854~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b901bab29b2fe53d666b5939dafe87e591b939b;p=platform%2Fcore%2Fuifw%2Flibtdm.git move a registration of commit_cb before calling output_commit If TDM backend works without events (for example fbdev backend) then it should be able to call the commit handler function right after doing commit. Change-Id: I981a02bf257fda116861554db47e0bdf822bfa1f Signed-off-by: Roman Marchenko --- diff --git a/src/tdm_display.c b/src/tdm_display.c index 17902296..969b2279 100644 --- a/src/tdm_display.c +++ b/src/tdm_display.c @@ -1058,16 +1058,16 @@ _tdm_output_commit(tdm_output *output, int sync, tdm_output_commit_handler func, commit_handler->user_data = user_data; commit_handler->owner_tid = syscall(SYS_gettid); - ret = func_output->output_commit(private_output->output_backend, sync, - commit_handler); - TDM_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret); - if (!private_output->regist_commit_cb) { private_output->regist_commit_cb = 1; ret = func_output->output_set_commit_handler(private_output->output_backend, tdm_output_cb_commit); } + ret = func_output->output_commit(private_output->output_backend, sync, + commit_handler); + TDM_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret); + return ret; }