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

Unified Diff: cc/trees/occlusion_tracker.cc

Issue 2119043002: cc: Correct inverted directions in occlusion tracker background filter logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment to point out the scale matrix both enne and I missed 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 | « no previous file | cc/trees/occlusion_tracker_unittest.cc » ('j') | 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 fe5b0a355e7d0e6ebb0e7535d4a4450b7b9a6ea7..09519af99f9e4fcc1ca605097908cf317b23fa97 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -211,9 +211,11 @@ static void ReduceOcclusionBelowSurface(
&outset_top, &outset_right, &outset_bottom, &outset_left);
// The filter can move pixels from outside of the clip, so allow affected_area
- // to expand outside the clip.
- affected_area_in_target.Inset(
- -outset_left, -outset_top, -outset_right, -outset_bottom);
+ // to expand outside the clip. Notably the content we're concerned with here
+ // is not the affected area, but rather stuff slightly outside it. Thus the
+ // directions of the outsets are reversed from normal.
+ affected_area_in_target.Inset(-outset_right, -outset_bottom, -outset_left,
+ -outset_top);
SimpleEnclosedRegion affected_occlusion = *occlusion_from_inside_target;
affected_occlusion.Intersect(affected_area_in_target);
« no previous file with comments | « no previous file | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698