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

Unified Diff: cc/trees/occlusion_tracker_unittest.cc

Issue 2176903002: cc: Fix occlusion tracking for layers with non-default blend modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« cc/trees/occlusion_tracker.cc ('K') | « cc/trees/occlusion_tracker.cc ('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_unittest.cc
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 48eaefc5511194019dbb4110f98eecd333c7231f..c066a3b9dcd21c803c50720735138f52f32dabbf 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -1987,10 +1987,13 @@ class OcclusionTrackerTestBlendModeDoesNotOcclude
EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
this->VisitLayer(blend_mode_layer, &occlusion);
- // |top_layer| occludes but not |blend_mode_layer|.
+ // |top_layer| and |blend_mode_layer| both occlude, since the blend mode
+ // gets applied by blend_mode_layer's render surface, not when drawing the
+ // layer itself.
+ EXPECT_EQ(gfx::Rect(100, 100).ToString(),
+ occlusion.occlusion_from_inside_target().ToString());
EXPECT_EQ(gfx::Rect(10, 12, 20, 22).ToString(),
occlusion.occlusion_from_outside_target().ToString());
- EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
this->VisitContributingSurface(blend_mode_layer, &occlusion);
// |top_layer| occludes but not |blend_mode_layer|.
« cc/trees/occlusion_tracker.cc ('K') | « cc/trees/occlusion_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698