Index: cc/test/layer_test_common.cc |
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc |
index b7c415b7c6e5ee77f1efc8365a6bd813f4f192cf..685c0fbc7e8466761976cd5f3e0480865cd7cdf9 100644 |
--- a/cc/test/layer_test_common.cc |
+++ b/cc/test/layer_test_common.cc |
@@ -64,14 +64,14 @@ void LayerTestCommon::VerifyQuadsExactlyCoverRect(const QuadList& quads, |
} |
// static |
-void LayerTestCommon::VerifyQuadsCoverRectWithOcclusion( |
- const QuadList& quads, |
- const gfx::Rect& rect, |
- const gfx::Rect& occluded, |
- size_t* partially_occluded_count) { |
+void LayerTestCommon::VerifyQuadsAreOccluded(const QuadList& quads, |
+ const gfx::Rect& occluded, |
+ size_t* partially_occluded_count) { |
// No quad should exist if it's fully occluded. |
for (size_t i = 0; i < quads.size(); ++i) { |
- EXPECT_FALSE(occluded.Contains(quads[i]->visible_rect)); |
+ gfx::Rect target_visible_rect = MathUtil::MapEnclosingClippedRect( |
+ quads[i]->quadTransform(), quads[i]->visible_rect); |
+ EXPECT_FALSE(occluded.Contains(target_visible_rect)); |
} |
// Quads that are fully occluded on one axis only should be shrunken. |