forked from airbnb/lottie-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created GreedyContents to clean up merge path handling (airbnb#362)
- Loading branch information
Showing
3 changed files
with
37 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.airbnb.lottie; | ||
|
||
import java.util.ListIterator; | ||
|
||
/** | ||
* Content that may want to absorb and take ownership of the content around it. | ||
* For example, merge paths will absorb the shapes above it and repeaters will absorb the content | ||
* above it. | ||
*/ | ||
interface GreedyContent { | ||
/** | ||
* An iterator of contents that can be used to take ownership of contents. If ownership is taken, | ||
* the content should be removed from the iterator. | ||
* | ||
* The contents should be iterated by calling hasPrevious() and previous() so that the list of | ||
* contents is traversed from bottom to top which is the correct order for handling AE logic. | ||
*/ | ||
void absorbContent(ListIterator<Content> contents); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters