Skip to content

Commit

Permalink
Fix clearing dirty flag (#2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpeal authored Feb 21, 2022
1 parent 6034500 commit 794ffa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 5.0.0
# 5.0.1
### New Features
* [Removed API] Removed the `setScale(float)` APIs from `LottieAnimationView` and `LottieDrawable`. The expected behavior was highly ambiguous when paired with other scale types and canvas transformations. For the vast majority of cases, ImageView.ScaleType should be sufficient. For remaining cases, you may apply transformations to Canvas and use `LottieDrawable#draw` directly.
* Added support for the "Rounded Corners" effect on Shape and Rect layers ([#1953](https://github.com/airbnb/lottie-android/pull/1953))
Expand Down
3 changes: 2 additions & 1 deletion lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ public void draw(@NonNull Canvas canvas) {
}
}

isDirty = false;
L.endSection("Drawable#draw");
}

Expand All @@ -540,6 +541,7 @@ public void draw(Canvas canvas, Matrix matrix) {
} else {
compositionLayer.draw(canvas, matrix, alpha);
}
isDirty = false;
}

// <editor-fold desc="animator">
Expand Down Expand Up @@ -1412,7 +1414,6 @@ private void renderAndDrawAsBitmap(Canvas originalCanvas, CompositionLayer compo
softwareRenderingOriginalCanvasMatrix.invert(softwareRenderingOriginalCanvasMatrixInverse);
softwareRenderingOriginalCanvasMatrixInverse.mapRect(softwareRenderingDstBoundsRectF, softwareRenderingTransformedBounds);
convertRect(softwareRenderingDstBoundsRectF, softwareRenderingDstBoundsRect);
isDirty = false;
}

softwareRenderingSrcBoundsRect.set(0, 0, renderWidth, renderHeight);
Expand Down

0 comments on commit 794ffa5

Please sign in to comment.