Skip to content
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

Fix the deadlock issue when onSurfaceCreated is called after setting Sync in PAGView #2498

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

Hparty
Copy link
Collaborator

@Hparty Hparty commented Sep 25, 2024

No description provided.

@@ -874,7 +874,6 @@ void JPAGView::onSurfaceCreated(NativeWindow* window) {
return;
}
player->setSurface(pag::PAGSurface::MakeFrom(drawable));
animator->update();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

animator update时会使用JPAGView上的锁,导致onSurfaceCreated和update死锁了。把animator->update()逻辑放在ts层,这样两个地方就不会同时请求一个锁了

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.44%. Comparing base (7393913) to head (66e19ae).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2498      +/-   ##
==========================================
+ Coverage   77.42%   77.44%   +0.02%     
==========================================
  Files         420      420              
  Lines       22456    22456              
  Branches     6310     6315       +5     
==========================================
+ Hits        17386    17391       +5     
+ Misses       3814     3813       -1     
+ Partials     1256     1252       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@domchen domchen merged commit ab16e1f into main Sep 25, 2024
8 checks passed
@domchen domchen deleted the bugfix/ohos_pagview_deadlock branch September 25, 2024 13:26
kevingpqi123 added a commit that referenced this pull request Sep 26, 2024
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.

4 participants