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

Unified Diff: cc/layers/texture_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/texture_layer.cc
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index 05391fe5d637bf8a93c2cd4ae8b1dac11ff643ac..5d386ca07cf7e25006d9319c75f8745a516ee045 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -45,6 +45,7 @@ void TextureLayer::ClearClient() {
layer_tree_host()->StopRateLimiter();
client_ = NULL;
ClearTexture();
+ 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 Same as PictureLayer. Layer::HasDrawableContent wi
}
void TextureLayer::ClearTexture() {
@@ -136,6 +137,7 @@ void TextureLayer::SetTextureMailboxInternal(
else
SetNeedsPushProperties();
+ UpdateDrawsContent(HasDrawableContent());
// The active frame needs to be replaced and the mailbox returned before the
// commit is called complete.
SetNextCommitWaitsForActivation();
@@ -198,8 +200,8 @@ void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) {
Layer::SetLayerTreeHost(host);
}
-bool TextureLayer::DrawsContent() const {
- return (client_ || holder_ref_) && Layer::DrawsContent();
+bool TextureLayer::HasDrawableContent() const {
+ return (client_ || holder_ref_) && Layer::HasDrawableContent();
}
bool TextureLayer::Update(ResourceUpdateQueue* queue,

Powered by Google App Engine
This is Rietveld 408576698