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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 26112002: cc: Fix hit-testing in zero-opacity layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index d93e3d5e032e80c8cf353b672338904f832a16f2..14ea6b0b3dc9e3779fac85d39f78c44c5a503af2 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1058,11 +1058,15 @@ void LayerTreeHost::PaintLayerContents(
PaintMasksForRenderSurface(
*it, queue, did_paint_content, need_more_updates);
} else if (it.represents_itself() && it->DrawsContent()) {
- devtools_instrumentation::ScopedLayerTreeTask
- update_layer(devtools_instrumentation::kUpdateLayer, it->id(), id());
- DCHECK(!it->paint_properties().bounds.IsEmpty());
- *did_paint_content |= it->Update(queue, &occlusion_tracker);
- *need_more_updates |= it->NeedMoreUpdates();
+ bool zero_opacity = !it->draw_opacity() &&
enne (OOO) 2013/10/29 23:54:22 Zero opacity is not the only reason to skip a laye
sadrul 2013/10/30 15:44:42 Done (I am calling it 'skip_drawing' to be more li
+ !it->draw_opacity_is_animating();
+ if (!zero_opacity) {
+ devtools_instrumentation::ScopedLayerTreeTask update_layer(
+ devtools_instrumentation::kUpdateLayer, it->id(), id());
+ DCHECK(!it->paint_properties().bounds.IsEmpty());
+ *did_paint_content |= it->Update(queue, &occlusion_tracker);
+ *need_more_updates |= it->NeedMoreUpdates();
+ }
}
occlusion_tracker.LeaveLayer(it);

Powered by Google App Engine
This is Rietveld 408576698