Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: cc/layers/picture_layer.cc

Issue 373113003: Keeping track of descendants that draw content instead of recalcualting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
+}
+
+bool PictureLayer::HasDrawableContent() const {
+ return client_ && Layer::HasDrawableContent();
+}
+
void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
benchmark->RunOnLayer(this);
}
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698