Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Fix [GitHub Issue #1451] Canabalt [ARM-x86]: blocked at splash screen#1471

Merged
yiyang-msft merged 2 commits intodevelopfrom
yiyang/layer
Nov 30, 2016
Merged

Fix [GitHub Issue #1451] Canabalt [ARM-x86]: blocked at splash screen#1471
yiyang-msft merged 2 commits intodevelopfrom
yiyang/layer

Conversation

@yiyang-msft
Copy link
Copy Markdown
Contributor

@yiyang-msft yiyang-msft commented Nov 30, 2016

The issue here is that when a sublayer is removed from super, we need call setNeedsLayout which will flush out corresponding transactions to update the view hierarchy.

This is based on the observation from reference platform when removing layer. The following call sequence is happening.

[subLayer removeFromSuper] triggers the following call sequence
[CALayer setNeedsLayout] -> [CALayer drawInContext] ->[UIView drawRect]


This change is Reviewable

pSuper->priv->removeChild(self);

[pSuper setNeedsLayout];
[self release];
Copy link
Copy Markdown
Member

@tadam-msft tadam-msft Nov 30, 2016

Choose a reason for hiding this comment

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

Looks good, can we get a XAMLCatalog sample that would demonstrate this issue 100%--maybe on a new "Bugs" section #Pending

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have a repro and a test case in progress. will check it in separately.


In reply to: 90150570 [](ancestors = 90150570)

pSuper->priv->removeChild(self);

[pSuper setNeedsLayout];
[self release];
Copy link
Copy Markdown
Contributor

@jaredhms jaredhms Nov 30, 2016

Choose a reason for hiding this comment

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

[self release]; [](start = 4, length = 15)

wow - that's kind of odd. you'd think that the superlayer would be holding the reference....? #WontFix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

indeed strange. we will re-visit its usage pattern later though.


In reply to: 90150584 [](ancestors = 90150584)

@jaredhms
Copy link
Copy Markdown
Contributor

jaredhms commented Nov 30, 2016

CALayer* pSuper = (CALayer*)priv->superlayer;

nit: can we remove the hungarian while we're here? #Resolved


Refers to: Frameworks/QuartzCore/CALayer.mm:809 in 8cdcd27. [](commit_id = 8cdcd27, deletion_comment = False)

@jaredhms
Copy link
Copy Markdown
Contributor

:shipit:

@yiyang-msft yiyang-msft merged commit 30279ca into develop Nov 30, 2016
tadam-msft pushed a commit to tadam-msft/WinObjC that referenced this pull request Nov 30, 2016
…sh screen (microsoft#1471)

* Fix [GitHub Issue microsoft#1451] Canabalt [ARM-x86]: blocked at splash screen

* comments
@yiyang-msft yiyang-msft deleted the yiyang/layer branch December 1, 2016 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants