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

Unified Diff: chrome/browser/android/compositor/layer/content_layer.cc

Issue 2352733002: android: Fix drawing content layer identification for tab. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/compositor/layer/content_layer.cc
diff --git a/chrome/browser/android/compositor/layer/content_layer.cc b/chrome/browser/android/compositor/layer/content_layer.cc
index 16e67e92971a9defda25499d4fb775ee31ccbf92..d7114975843e15f28ccab11942d7af36b0a05513 100644
--- a/chrome/browser/android/compositor/layer/content_layer.cc
+++ b/chrome/browser/android/compositor/layer/content_layer.cc
@@ -36,12 +36,15 @@ static bool DoesLeafDrawContents(scoped_refptr<cc::Layer> layer) {
if (!layer.get())
return false;
+ // If the subtree is hidden, then any layers in this tree will not be drawn.
+ if (layer->hide_layer_and_subtree())
+ return false;
+
// TODO: Remove the need for this logic. We can't really guess from
// an opaque layer type whether it has valid live contents, or for example
// just a background color placeholder. Need to get this from somewhere else
// like ContentViewCore or RWHV.
- if (layer->DrawsContent() && !layer->hide_layer_and_subtree() &&
- !layer->background_color()) {
+ if (layer->DrawsContent() && !layer->background_color()) {
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698