Skip to content

Commit

Permalink
修复 PAGImageView 重置资源相关的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcli committed Jul 11, 2023
1 parent dbefc35 commit 21df610
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions android/libpag/src/main/java/org/libpag/PAGImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ public void setComposition(PAGComposition newComposition) {
* PAGImageView.
*/
public void setComposition(PAGComposition newComposition, float maxFrameRate) {
if (newComposition == _composition && _maxFrameRate == maxFrameRate && decoderInfo.isValid()) {
return;
}
refreshResource(null, newComposition, maxFrameRate);
}

Expand Down Expand Up @@ -473,6 +470,7 @@ private void refreshResource(String path, PAGComposition composition, float maxF
_pagFilePath = path;
_composition = composition;
_currentFrame = 0;
_numFrames = 0;
progressExplicitlySet = true;
synchronized (animatorLock) {
animator.setDuration(_composition == null ? 0 : _composition.duration() / 100);
Expand Down

0 comments on commit 21df610

Please sign in to comment.