summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/layers/picture_layer.cc')
-rw-r--r--cc/layers/picture_layer.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index b9f265a..d2e29b6 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());
+}
+
+bool PictureLayer::HasDrawableContent() const {
+ return client_ && Layer::HasDrawableContent();
+}
+
void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
benchmark->RunOnLayer(this);
}