Skip to content

Commit

Permalink
Avoid unnecessary frame allocation in GifDecoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjudd committed Feb 17, 2015
1 parent 34fdef9 commit e85cf30
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ private Bitmap setPixels(GifFrame currentFrame, GifFrame previousFrame) {
}

// Copy pixels into previous image
if (savePrevious && currentFrame.dispose == DISPOSAL_UNSPECIFIED || currentFrame.dispose == DISPOSAL_NONE) {
if (savePrevious && (currentFrame.dispose == DISPOSAL_UNSPECIFIED
|| currentFrame.dispose == DISPOSAL_NONE)) {
if (previousImage == null) {
previousImage = getNextBitmap();
}
Expand Down

0 comments on commit e85cf30

Please sign in to comment.