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

fix a node background color in non layer baked mode. #1693

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

vovasty
Copy link
Contributor

@vovasty vovasty commented Oct 1, 2019

This fixes problem with snapshot testing: when color is dynamic and node is not layer backed, background color remains the same.

if (!CGColorEqualToColor(_layer.backgroundColor, cgBackgroundColor)) {
_layer.backgroundColor = cgBackgroundColor;
}
} else {
// we set view and layer background color in _ASPendingState, so do the same here
if (!CGColorEqualToColor(_layer.backgroundColor, cgBackgroundColor)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to move the color equality test up, so that the code doesn't have to be here twice?

@vovasty vovasty force-pushed the vlad/ASDisplayNode-background branch from ac607c4 to ed629d2 Compare October 1, 2019 18:49
@vovasty vovasty force-pushed the vlad/ASDisplayNode-background branch from ed629d2 to 287747c Compare October 8, 2019 22:35
@vovasty vovasty merged commit 6baf29a into TextureGroup:master Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants