Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ASNetworkImageNode delegate callout behavior #778

Merged
merged 3 commits into from
Jan 31, 2018

Conversation

Adlai-Holler
Copy link
Member

  • Don't dispatch to main thread if there's no callout to run.
  • Don't lock and then immediately unlock when we reach the main thread.
  • Don't call out with nil image in the case of animated images.
  • Call out using the exact image we loaded, instead of re-reading self.image at callout time, when it may have changed. If we loaded another image in the mean time, we will have scheduled that callout and it's important to preserve the serial nature here.

As I commented in #775, the docs say these callouts are off-main, but I decided to keep the on-main behavior for this diff.

@Adlai-Holler
Copy link
Member Author

Use side-by-side for this one imo 😞

Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Adlai-Holler Adlai-Holler merged commit 0c4ccc5 into master Jan 31, 2018
@Adlai-Holler Adlai-Holler deleted the AHSkipImageNodeDelegateLock branch January 31, 2018 20:18
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* Improve ASNetworkImageNode delegate callout behavior

* no message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants