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..d2e29b691837a39f0842fa2ddcb3d0c9808c02f0 100644 |
| --- a/cc/layers/picture_layer.cc |
| +++ b/cc/layers/picture_layer.cc |
| @@ -28,10 +28,6 @@ PictureLayer::PictureLayer(ContentLayerClient* client) |
| PictureLayer::~PictureLayer() { |
| } |
| -bool PictureLayer::DrawsContent() const { |
| - return Layer::DrawsContent() && client_; |
| -} |
| - |
| scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
| return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); |
| } |
| @@ -200,6 +196,15 @@ bool PictureLayer::IsSuitableForGpuRasterization() const { |
| return pile_->is_suitable_for_gpu_rasterization(); |
| } |
| +void PictureLayer::ClearClient() { |
| + client_ = NULL; |
| + UpdateDrawsContent(HasDrawableContent()); |
|
danakj
2014/08/06 14:57:08
Do we need to call this in the Constructor as well
awoloszyn
2014/08/08 15:53:20
There is no need in this case, since it will still
|
| +} |
| + |
| +bool PictureLayer::HasDrawableContent() const { |
| + return client_ && Layer::HasDrawableContent(); |
| +} |
| + |
| void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
| benchmark->RunOnLayer(this); |
| } |