Use EnsureBuffer in ShadowLayersParent and a bunch of other TODOs