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

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, 5 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698