Index: cc/layers/tiled_layer.cc |
diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc |
index 56df6f716ac25c61551ddd6da75437c9a9bece23..df5bac663fe41c1b7ea54277e85864b33912f886 100644 |
--- a/cc/layers/tiled_layer.cc |
+++ b/cc/layers/tiled_layer.cc |
@@ -155,27 +155,26 @@ void TiledLayer::UpdateBounds() { |
for (Region::Iterator new_rects(new_tiling_rect); new_rects.has_rect(); |
new_rects.next()) |
InvalidateContentRect(new_rects.rect()); |
+ UpdateDrawsContent(); |
} |
void TiledLayer::SetTileSize(const gfx::Size& size) { |
tiler_->SetTileSize(size); |
+ UpdateDrawsContent(); |
} |
void TiledLayer::SetBorderTexelOption( |
LayerTilingData::BorderTexelOption border_texel_option) { |
tiler_->SetBorderTexelOption(border_texel_option); |
+ UpdateDrawsContent(); |
} |
-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() { |