Remote Layer Tree: Assertions during layer flushing after replaceSublayer()

https://bugs.webkit.org/show_bug.cgi?id=124194

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::replaceSublayer):
Only remove the old layer from the children array once (via removeFromSuperlayer).
Update the superlayer backpointer on the new layer.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 59e56558
2013-11-12 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Assertions during layer flushing after replaceSublayer()
https://bugs.webkit.org/show_bug.cgi?id=124194
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::replaceSublayer):
Only remove the old layer from the children array once (via removeFromSuperlayer).
Update the superlayer backpointer on the new layer.
2013-11-12 Anders Carlsson <andersca@apple.com>
Add ImmutableArray::createStringArray
......
......@@ -233,8 +233,8 @@ void PlatformCALayerRemote::replaceSublayer(PlatformCALayer* reference, Platform
size_t referenceIndex = m_children.find(reference);
if (referenceIndex != notFound) {
m_children[referenceIndex]->removeFromSuperlayer();
m_children.remove(referenceIndex);
m_children.insert(referenceIndex, layer);
toPlatformCALayerRemote(layer)->m_superlayer = this;
}
m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment