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 86f45b6922efcec0ba4daa3084378384fd8e6ba4..2877eb54f661156eed63131b54b7c60c3474df8e 100644 |
| --- a/cc/layers/picture_layer_impl.cc |
| +++ b/cc/layers/picture_layer_impl.cc |
| @@ -179,10 +179,10 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, |
| } else if (mode == ManagedTileState::TileVersion::PICTURE_PILE_MODE) { |
| color = DebugColors::PictureTileBorderColor(); |
| width = DebugColors::PictureTileBorderWidth(layer_tree_impl()); |
| - } else if (iter->priority(ACTIVE_TREE).resolution == HIGH_RESOLUTION) { |
| + } else if (iter.priority().resolution == HIGH_RESOLUTION) { |
| color = DebugColors::HighResTileBorderColor(); |
| width = DebugColors::HighResTileBorderWidth(layer_tree_impl()); |
| - } else if (iter->priority(ACTIVE_TREE).resolution == LOW_RESOLUTION) { |
| + } else if (iter.priority().resolution == LOW_RESOLUTION) { |
| color = DebugColors::LowResTileBorderColor(); |
| width = DebugColors::LowResTileBorderWidth(layer_tree_impl()); |
| } else if (iter->contents_scale() > contents_scale_x()) { |
| @@ -479,6 +479,14 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, |
| is_using_lcd_text_); |
| } |
| +scoped_refptr<TileBundle> PictureLayerImpl::CreateTileBundle(int width, |
|
enne (OOO)
2013/11/25 22:17:11
Are all these parameters just a gfx::Rect (in...co
vmpstr
2013/11/27 00:03:15
Yup, changed.
|
| + int height, |
| + int offset_x, |
| + int offset_y) { |
| + return layer_tree_impl()->tile_manager()->CreateTileBundle( |
| + width, height, offset_x, offset_y); |
| +} |
| + |
| void PictureLayerImpl::UpdatePile(Tile* tile) { |
| tile->set_picture_pile(pile_); |
| } |
| @@ -499,6 +507,14 @@ const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( |
| return NULL; |
| } |
| +bool PictureLayerImpl::IsActive() const { |
|
enne (OOO)
2013/11/25 22:17:11
I think PictureLayerTiling is guaranteed to be cre
vmpstr
2013/11/27 00:03:15
The one state change that's missing is going from
|
| + return layer_tree_impl()->IsActiveTree(); |
| +} |
| + |
| +bool PictureLayerImpl::IsPending() const { |
| + return layer_tree_impl()->IsPendingTree(); |
| +} |
| + |
| gfx::Size PictureLayerImpl::CalculateTileSize( |
| gfx::Size content_bounds) const { |
| if (is_mask_) { |
| @@ -705,7 +721,7 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const { |
| // This iteration is over the visible content rect which is potentially |
| // less conservative than projecting the viewport into the layer. |
| // Ignore tiles that are know to be outside the viewport. |
| - if (iter->priority(PENDING_TREE).distance_to_visible_in_pixels != 0) |
| + if (iter.priority().distance_to_visible_in_pixels != 0) |
| continue; |
| missing_region.Subtract(iter.geometry_rect()); |
| @@ -726,7 +742,7 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const { |
| // This iteration is over the visible content rect which is potentially |
| // less conservative than projecting the viewport into the layer. |
| // Ignore tiles that are know to be outside the viewport. |
| - if (iter->priority(PENDING_TREE).distance_to_visible_in_pixels != 0) |
| + if (iter.priority().distance_to_visible_in_pixels != 0) |
| continue; |
| // If the missing region doesn't cover it, this tile is fully |