Index: cc/layers/picture_layer_impl.cc |
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc |
index 6d8914033e1d43802052d9f9302bb656a1b9e657..afb78f5ae268555f6f56c14f366bfaaa82918ed8 100644 |
--- a/cc/layers/picture_layer_impl.cc |
+++ b/cc/layers/picture_layer_impl.cc |
@@ -122,14 +122,16 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) { |
twin_layer_ = layer_impl; |
layer_impl->twin_layer_ = this; |
- layer_impl->UpdateRasterSource(raster_source_); |
- |
DCHECK(!raster_source_->IsSolidColor() || !tilings_->num_tilings()); |
// Tilings would be expensive to push, so we swap. |
layer_impl->tilings_.swap(tilings_); |
layer_impl->tilings_->SetClient(layer_impl); |
- if (tilings_) |
+ if (tilings_) { |
tilings_->SetClient(this); |
+ tilings_->SetRasterSource(raster_source_.get()); |
+ } |
+ |
+ layer_impl->UpdateRasterSource(raster_source_); |
// Ensure that the recycle tree doesn't have any unshared tiles. |
if (tilings_ && raster_source_->IsSolidColor()) |
@@ -167,6 +169,9 @@ void PictureLayerImpl::UpdateRasterSource( |
if (could_have_tilings != CanHaveTilings()) { |
layer_tree_impl()->set_needs_update_draw_properties(); |
} |
+ |
+ if (tilings_) |
+ tilings_->SetRasterSource(raster_source_.get()); |
} |
void PictureLayerImpl::AppendQuads(RenderPass* render_pass, |
@@ -632,10 +637,6 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, |
flags); |
} |
-RasterSource* PictureLayerImpl::GetRasterSource() { |
- return raster_source_.get(); |
-} |
- |
const Region* PictureLayerImpl::GetPendingInvalidation() { |
if (layer_tree_impl()->IsPendingTree()) |
return &invalidation_; |
@@ -865,7 +866,7 @@ void PictureLayerImpl::DoPostCommitInitialization() { |
DCHECK(layer_tree_impl()->IsPendingTree()); |
if (!tilings_) |
- tilings_ = make_scoped_ptr(new PictureLayerTilingSet(this)); |
+ tilings_ = PictureLayerTilingSet::Create(this, raster_source_.get()); |
PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer(); |
if (twin_layer) { |