Chromium Code Reviews| Index: cc/layers/image_layer.cc |
| diff --git a/cc/layers/image_layer.cc b/cc/layers/image_layer.cc |
| index cada84df3ccb4a0ce63731db532f2e0cd1f08358..c10b56546f21a2f0c1c584238c6be801bbbeae66 100644 |
| --- a/cc/layers/image_layer.cc |
| +++ b/cc/layers/image_layer.cc |
| @@ -30,9 +30,14 @@ void ImageLayer::SetBitmap(const SkBitmap& bitmap) { |
| return; |
| bitmap_ = bitmap; |
| + UpdateDrawsContent(); |
| SetNeedsDisplay(); |
| } |
| +bool ImageLayer::HasDrawableContent() const { |
| + return !bitmap_.isNull() && TiledLayer::HasDrawableContent(); |
|
danakj
2014/07/14 20:22:02
Ok this is more clear to me what's going on, but I
awoloszyn
2014/07/16 20:44:19
Done.
|
| +} |
| + |
| void ImageLayer::SetTexturePriorities(const PriorityCalculator& priority_calc) { |
| // Update the tile data before creating all the layer's tiles. |
| UpdateTileSizeAndTilingOption(); |
| @@ -77,10 +82,6 @@ void ImageLayer::CalculateContentsScale(float ideal_contents_scale, |
| *content_bounds = gfx::Size(bitmap_.width(), bitmap_.height()); |
| } |
| -bool ImageLayer::DrawsContent() const { |
| - return !bitmap_.isNull() && TiledLayer::DrawsContent(); |
| -} |
| - |
| void ImageLayer::OnOutputSurfaceCreated() { |
| SetTextureFormat( |
| layer_tree_host()->GetRendererCapabilities().best_texture_format); |