Skip to content

Commit

Permalink
Fix the deadlock issue when onSurfaceCreated is called after setting …
Browse files Browse the repository at this point in the history
…Sync in PAGView
  • Loading branch information
Hparty committed Sep 25, 2024
1 parent 7393913 commit d0c9451
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ohos/libpag/src/main/ets/PAGView.ets
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ export struct PAGView {
libraryname: "pag",
})
.backgroundColor(Color.Transparent)
.onLoad(() => {
this.controller.update();
})
}

onPageShow(): void {
Expand Down
1 change: 0 additions & 1 deletion src/platform/ohos/JPAGView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,6 @@ void JPAGView::onSurfaceCreated(NativeWindow* window) {
return;
}
player->setSurface(pag::PAGSurface::MakeFrom(drawable));
animator->update();
}

void JPAGView::onSurfaceSizeChanged() {
Expand Down

0 comments on commit d0c9451

Please sign in to comment.