Skip to content

Commit

Permalink
Fix PAGImageView problems (#858)
Browse files Browse the repository at this point in the history
Co-authored-by: liamcli <liamcli@tencent.com>
(cherry picked from commit eba6fd2)
  • Loading branch information
h3r3x3 authored and kevingpqi123 committed Apr 12, 2023
1 parent fa89512 commit a956eea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions android/libpag/src/main/java/org/libpag/PAGImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,8 @@ protected void initDecoderInfo() {
decoderInfo._width, decoderInfo._height,
decoderInfo.numFrames);
}
} else {
refreshMatrixFromScaleMode();
}
refreshMatrixFromScaleMode();
freezeDraw.set(false);
}

Expand Down Expand Up @@ -884,7 +883,7 @@ private void notifyAnimationUpdate() {

@Override
protected void onDraw(Canvas canvas) {
if (renderBitmap != null && !renderBitmap.isRecycled()) {
if (!freezeDraw.get() && renderBitmap != null && !renderBitmap.isRecycled()) {
super.onDraw(canvas);
canvas.save();
if (renderMatrix != null) {
Expand Down

0 comments on commit a956eea

Please sign in to comment.