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

Unified Diff: cc/trees/occlusion_tracker_unittest.cc

Issue 2866063002: Improve overdraw with multiple windows (Closed)
Patch Set: address comments Created 3 years, 7 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/occlusion_tracker_unittest.cc
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 8389954958e4689b8ff28fc37e6b81cb151a878e..a206aadacf80b3e4860b9530096934c65fbc82e7 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -1465,8 +1465,13 @@ class OcclusionTrackerTestPixelsNeededForDropShadowBackgroundFilter
case LEFT:
// The right half of the occlusion is close enough to cast a shadow
// that would be visible in the background filter. The shadow reaches
- // 3*5 + 10 = 25 pixels to the right.
- expected_occlusion = gfx::Rect(0, 0, 25, 200);
+ // 3*5 + 10 = 25 pixels to the right, which is (0, 0, 25, 200). The
+ // rect created in filtered_surface is (50, 50, 100, 100), which
+ // becomes (25, 25, 20, 80) after applying gfx::Transform
+ // |scale_by_half|, adding FilterOperations |filters| and updating
+ // opacity pixel outside the rect. Union (0, 0, 25, 200) and
+ // (25, 25, 20, 80), it's (0, 25, 45, 80)
+ expected_occlusion = gfx::Rect(0, 25, 45, 80);
break;
case RIGHT:
// The shadow spreads 3*5 - 10 = 5 pixels to the left, so the
@@ -1475,7 +1480,7 @@ class OcclusionTrackerTestPixelsNeededForDropShadowBackgroundFilter
break;
case TOP:
// Similar to LEFT.
- expected_occlusion = gfx::Rect(0, 0, 200, 25);
+ expected_occlusion = gfx::Rect(25, 0, 80, 45);
break;
case BOTTOM:
// Similar to RIGHT.
« cc/base/simple_enclosed_region.cc ('K') | « cc/base/simple_enclosed_region_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698