PassRefPtr<CoordinatedBackingStore> LayerTreeRenderer::getBackingStore(WebLayerID id) { TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id)); ASSERT(layer); RefPtr<CoordinatedBackingStore> backingStore = static_cast<CoordinatedBackingStore*>(layer->backingStore().get()); if (!backingStore) { backingStore = CoordinatedBackingStore::create(); layer->setBackingStore(backingStore.get()); } ASSERT(backingStore); return backingStore; }
PassRefPtr<LayerBackingStore> LayerTreeHostProxy::getBackingStore(WebLayerID id) { ensureLayer(id); TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id)); RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(layer->backingStore().get()); if (!backingStore) { backingStore = LayerBackingStore::create(); layer->setBackingStore(backingStore.get()); } ASSERT(backingStore); return backingStore; }