Chromium Code Reviews| Index: cc/layers/picture_layer.cc |
| diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc |
| index b9f265a02a4b15d29cb7ba7f85e18e56f0454b31..a60788b214a83542880ef92d71f1ed838badba30 100644 |
| --- a/cc/layers/picture_layer.cc |
| +++ b/cc/layers/picture_layer.cc |
| @@ -28,8 +28,8 @@ PictureLayer::PictureLayer(ContentLayerClient* client) |
| PictureLayer::~PictureLayer() { |
| } |
| -bool PictureLayer::DrawsContent() const { |
| - return Layer::DrawsContent() && client_; |
| +bool PictureLayer::HasDrawableContent() const { |
|
danakj
2014/07/17 17:21:25
can you move this by ClearClient? I liked them clo
awoloszyn
2014/07/17 20:45:00
Done.
|
| + return client_ && Layer::HasDrawableContent(); |
| } |
| scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
| @@ -200,6 +200,11 @@ bool PictureLayer::IsSuitableForGpuRasterization() const { |
| return pile_->is_suitable_for_gpu_rasterization(); |
| } |
| +void PictureLayer::ClearClient() { |
| + client_ = NULL; |
| + UpdateDrawsContent(HasDrawableContent()); |
| +} |
| + |
| void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
| benchmark->RunOnLayer(this); |
| } |