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

Unified Diff: cc/trees/occlusion_tracker.cc

Issue 2147283002: cc : Fix occlusion tracking bug for contributing surface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mask test Created 4 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
« no previous file with comments | « cc/trees/occlusion_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker.cc
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index 09519af99f9e4fcc1ca605097908cf317b23fa97..93822ba68bd028703ee2abb2a9a92ac9a3010bfd 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -48,6 +48,14 @@ Occlusion OcclusionTracker::GetCurrentOcclusionForContributingSurface(
second_last.occlusion_from_inside_target);
}
+const RenderSurfaceImpl*
+OcclusionTracker::OcclusionSurfaceForContributingSurface() const {
+ // A contributing surface doesn't get occluded by things inside its own
+ // surface, so only things outside the surface can occlude it. That occlusion
+ // is found just below the top of the stack (if it exists).
+ return (stack_.size() < 2) ? nullptr : stack_[stack_.size() - 2].target;
+}
+
void OcclusionTracker::EnterLayer(const LayerIteratorPosition& layer_iterator) {
LayerImpl* render_target = layer_iterator.target_render_surface_layer;
« no previous file with comments | « cc/trees/occlusion_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698