Merge "SF: Move/Refactor rebuildLayerStacks and computeVisibleRegions"