Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions shell/platform/tizen/tizen_vsync_waiter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TizenVsyncWaiter::TizenVsyncWaiter(FlutterTizenEngine* engine) {
}

TizenVsyncWaiter::~TizenVsyncWaiter() {
tdm_client_.reset();
tdm_client_->OnEngineStop();

SendMessage(kMessageQuit, 0);

Expand Down Expand Up @@ -130,10 +130,6 @@ TdmClient::TdmClient(FlutterTizenEngine* engine) {
}

TdmClient::~TdmClient() {
{
std::lock_guard<std::mutex> lock(engine_mutex_);
engine_ = nullptr;
}
if (vblank_) {
tdm_client_vblank_destroy(vblank_);
vblank_ = nullptr;
Expand All @@ -145,6 +141,15 @@ TdmClient::~TdmClient() {
}
}

bool TdmClient::IsValid() {
return vblank_ && client_;
}

void TdmClient::OnEngineStop() {
std::lock_guard<std::mutex> lock(engine_mutex_);
engine_ = nullptr;
}

void TdmClient::AwaitVblank(intptr_t baton) {
baton_ = baton;
tdm_error ret = tdm_client_vblank_wait(vblank_, 1, VblankCallback, this);
Expand All @@ -155,10 +160,6 @@ void TdmClient::AwaitVblank(intptr_t baton) {
tdm_client_handle_events(client_);
}

bool TdmClient::IsValid() {
return vblank_ && client_;
}

void TdmClient::VblankCallback(tdm_client_vblank* vblank,
tdm_error error,
unsigned int sequence,
Expand Down
1 change: 1 addition & 0 deletions shell/platform/tizen/tizen_vsync_waiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class TdmClient {
virtual ~TdmClient();

bool IsValid();
void OnEngineStop();
void AwaitVblank(intptr_t baton);

private:
Expand Down