| Index: cc/layers/tiled_layer.cc
|
| diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc
|
| index 6656405a72dbd001457d7a356b73365d1eacecf0..c1937e49f7e51693ed1e52f1d4f44fd98977c0b7 100644
|
| --- a/cc/layers/tiled_layer.cc
|
| +++ b/cc/layers/tiled_layer.cc
|
| @@ -154,27 +154,26 @@ void TiledLayer::UpdateBounds() {
|
| for (Region::Iterator new_rects(new_region); new_rects.has_rect();
|
| new_rects.next())
|
| InvalidateContentRect(new_rects.rect());
|
| + UpdateDrawsContent(HasDrawableContent());
|
| }
|
|
|
| void TiledLayer::SetTileSize(const gfx::Size& size) {
|
| tiler_->SetTileSize(size);
|
| + UpdateDrawsContent(HasDrawableContent());
|
| }
|
|
|
| void TiledLayer::SetBorderTexelOption(
|
| LayerTilingData::BorderTexelOption border_texel_option) {
|
| tiler_->SetBorderTexelOption(border_texel_option);
|
| + UpdateDrawsContent(HasDrawableContent());
|
| }
|
|
|
| -bool TiledLayer::DrawsContent() const {
|
| - if (!ContentsScalingLayer::DrawsContent())
|
| - return false;
|
| -
|
| +bool TiledLayer::HasDrawableContent() const {
|
| bool has_more_than_one_tile =
|
| - tiler_->num_tiles_x() > 1 || tiler_->num_tiles_y() > 1;
|
| - if (tiling_option_ == NEVER_TILE && has_more_than_one_tile)
|
| - return false;
|
| + (tiler_->num_tiles_x() > 1) || (tiler_->num_tiles_y() > 1);
|
|
|
| - return true;
|
| + return !(tiling_option_ == NEVER_TILE && has_more_than_one_tile) &&
|
| + ContentsScalingLayer::HasDrawableContent();
|
| }
|
|
|
| void TiledLayer::ReduceMemoryUsage() {
|
|
|