function getBackingStoreAncestor (layer) {
  while (layer) {
    if (layer.backingStoreId) {
      return layer;
    }
    layer = layer.parentLayer;
  }
  return null;
}
Find the nearest backing store ancestor for a given layer.

@param {RenderLayer} layer