Chromium Code Reviews| Index: cc/layers/picture_layer_impl.cc |
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc |
| index 24a83cb20d429bcac34b931df3ad32368278a5cd..ea97208f6516e1d7d94e5cdfb304e998d370efec 100644 |
| --- a/cc/layers/picture_layer_impl.cc |
| +++ b/cc/layers/picture_layer_impl.cc |
| @@ -377,8 +377,9 @@ skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() { |
| return pile_->GetFlattenedPicture(); |
| } |
| -scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, |
| - gfx::Rect content_rect) { |
| +scoped_refptr<Tile> PictureLayerImpl::CreateTile( |
| + const PictureLayerTiling* tiling, |
|
enne (OOO)
2013/05/02 23:25:37
This isn't actually needed. I previously was tryi
|
| + gfx::Rect content_rect) { |
| if (!pile_->CanRaster(tiling->contents_scale(), content_rect)) |
| return scoped_refptr<Tile>(); |
| @@ -524,6 +525,13 @@ void PictureLayerImpl::SyncTiling( |
| if (!DrawsContent() || tiling->contents_scale() < MinimumContentsScale()) |
| return; |
| tilings_->Clone(tiling); |
| + |
| + // If this tree needs update draw properties, then the tiling will |
| + // get updated prior to drawing or activation. If this tree does not |
| + // need update draw properties, then its transforms are up to date and |
| + // we can create tiles for this tiling immediately. |
| + if (!layer_tree_impl()->needs_update_draw_properties()) |
| + UpdateTilePriorities(); |
| } |
| void PictureLayerImpl::SetIsMask(bool is_mask) { |
| @@ -557,6 +565,7 @@ ResourceProvider::ResourceId PictureLayerImpl::ContentsResourceId() const { |
| bool PictureLayerImpl::AreVisibleResourcesReady() const { |
| DCHECK(layer_tree_impl()->IsPendingTree()); |
| + DCHECK(!layer_tree_impl()->needs_update_draw_properties()); |
| DCHECK(ideal_contents_scale_); |
| if (!tilings_->num_tilings()) |
| @@ -588,6 +597,7 @@ bool PictureLayerImpl::AreVisibleResourcesReady() const { |
| Region missing_region = rect; |
| for (size_t i = 0; i < tilings_->num_tilings(); ++i) { |
| PictureLayerTiling* tiling = tilings_->tiling_at(i); |
| + DCHECK(tiling->has_ever_been_updated()); |
| if (tiling->contents_scale() < min_acceptable_scale) |
| continue; |