Tencent / Tencent/libpag

在动画更新回调里获取当前帧率存在丢帧的情况

Open
#2,804 5 comments 0 reactions 1 assignee View on GitHub

@kevingpqi123 is already working on this.

Since May 4, 2025.

Dominant language
HTML
Stars
5.8k
Forks
531
Avg merge
8d 55m
Merged PRs (30d)
17

Description

public void onAnimationUpdate(PAGView pagView) {
long currentFrame = pagView.currentFrame();
Log.d(TAG, "xxx--->onAnimationUpdate:currentFrame="+currentFrame);
}

在播放更新回调里获取当前帧率存在丢帧和重复的情况,建议在回调的时候把当前帧率,时间等现场信息封装通过回调参数返回,以防止在回调中获取导致信息差异

图一:100帧丢了
Image

图二:58帧重复了
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.