-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor TizenVsyncWaiter #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor TizenVsyncWaiter #317
Conversation
| tdm_client_->OnEngineStop(); | ||
| } | ||
| Send(kMessageQuit, 0); | ||
| tdm_client_->OnEngineStop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about removing the OnEngineStop and doing its job in the TdmClient's destructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That partially reverts #204 and seems dangerous (a race condition may occur). Please check again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think below will be fine...but I think you can leave this as is.
| tdm_client_->OnEngineStop(); | |
| tdm_client_ = nullptr; |
TdmClient::~TdmClient() {
{
std::lock_guard<std::mutex> lock(engine_mutex_);
engine_ = nullptr;
}
DestroyTdm();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, then it makes sense. I'll apply the change.
5b30a18 to
95fc5c2
Compare
TizenVsyncWaiter:
SetTdmClientand maketdm_client_a shared_ptr. (The current code may cause a segmentation fault.)Send→SendMessageRequestVblankLoop→RunVblankLoopMsg→Messageeina_thread_queue_wait_doneafter finishing retrieving data frommessage.TdmClient:
CreateTdmandDestroyTdmand move the logic to the constructor and destructor.OnEngineStopand move the logic to the destructor.Miscellaneous:
texture_id_toint64_tinexternal_texture.h.constwithconstexprintizen_view_elementary.ccandtizen_window_*.cc.