Adding the check to avoid compositor thread not responsing in some
corner case and leads to UIWDT that found in android stability test.
Jira: https://jira01.devtools.intel.com/browse/OAM-61985
Test: stability test
Signed-off-by: Yuanjun Huang <yuanjun.huang@intel.com>
// succeed.
draw_succeeded_ = true;
tasks_lock_.unlock();
+
+ // Adding check to avoid waiting in this
+ // thread in certain corner case.
+ if (states_.empty() && media_states_.empty()) {
+ return draw_succeeded_;
+ }
+
Resume();
Wait();
return draw_succeeded_;