Skip to content

Conversation

@swift-kim
Copy link
Member

@swift-kim swift-kim commented Jul 18, 2022

TizenVsyncWaiter:

  • Remove SetTdmClient and make tdm_client_ a shared_ptr. (The current code may cause a segmentation fault.)
  • Rename methods, types, and variables. For example:
    • SendSendMessage
    • RequestVblankLoopRunVblankLoop
    • MsgMessage
  • Always call eina_thread_queue_wait_done after finishing retrieving data from message.

TdmClient:

  • Remove CreateTdm and DestroyTdm and move the logic to the constructor and destructor.
  • Remove OnEngineStop and move the logic to the destructor.

Miscellaneous:

  • Change the type of texture_id_ to int64_t in external_texture.h.
  • Replace const with constexpr in tizen_view_elementary.cc and tizen_window_*.cc.

tdm_client_->OnEngineStop();
}
Send(kMessageQuit, 0);
tdm_client_->OnEngineStop();
Copy link

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?

Copy link
Member Author

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.

Copy link

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.

Suggested change
tdm_client_->OnEngineStop();
tdm_client_ = nullptr;
TdmClient::~TdmClient() {
  {
    std::lock_guard<std::mutex> lock(engine_mutex_);
    engine_ = nullptr;
  }
  DestroyTdm();
}

Copy link
Member Author

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.

@swift-kim swift-kim force-pushed the refactor-vsync-waiter branch from 5b30a18 to 95fc5c2 Compare July 21, 2022 05:37
@swift-kim swift-kim merged commit 6c699b2 into flutter-tizen:flutter-3.0.0-tizen Jul 25, 2022
swift-kim added a commit that referenced this pull request Aug 5, 2022
swift-kim added a commit that referenced this pull request Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants