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

Unified Diff: cc/test/layer_test_common.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/test/fake_picture_layer_impl.h ('k') | cc/test/layer_tree_pixel_resource_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index a6dfa9c82f9ee1d75d115b81a0c501c80c1d36fe..762e82d9a50e08f81c25476ca9b197d52f11150a 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -69,17 +69,17 @@ void LayerTestCommon::VerifyQuadsAreOccluded(const QuadList& quads,
// No quad should exist if it's fully occluded.
for (const auto& quad : quads) {
gfx::Rect target_visible_rect = MathUtil::MapEnclosingClippedRect(
- quad.quadTransform(), quad.visible_rect);
+ quad->quadTransform(), quad->visible_rect);
EXPECT_FALSE(occluded.Contains(target_visible_rect));
}
// Quads that are fully occluded on one axis only should be shrunken.
for (const auto& quad : quads) {
- DCHECK(quad.quadTransform().IsIdentityOrIntegerTranslation());
+ DCHECK(quad->quadTransform().IsIdentityOrIntegerTranslation());
gfx::Rect target_rect =
- MathUtil::MapEnclosingClippedRect(quad.quadTransform(), quad.rect);
+ MathUtil::MapEnclosingClippedRect(quad->quadTransform(), quad->rect);
gfx::Rect target_visible_rect = MathUtil::MapEnclosingClippedRect(
- quad.quadTransform(), quad.visible_rect);
+ quad->quadTransform(), quad->visible_rect);
bool fully_occluded_horizontal = target_rect.x() >= occluded.x() &&
target_rect.right() <= occluded.right();
@@ -89,10 +89,10 @@ void LayerTestCommon::VerifyQuadsAreOccluded(const QuadList& quads,
target_rect.Intersects(occluded) &&
(fully_occluded_vertical || fully_occluded_horizontal);
if (!should_be_occluded) {
- EXPECT_EQ(quad.rect.ToString(), quad.visible_rect.ToString());
+ EXPECT_EQ(quad->rect.ToString(), quad->visible_rect.ToString());
} else {
- EXPECT_NE(quad.rect.ToString(), quad.visible_rect.ToString());
- EXPECT_TRUE(quad.rect.Contains(quad.visible_rect));
+ EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString());
+ EXPECT_TRUE(quad->rect.Contains(quad->visible_rect));
++(*partially_occluded_count);
}
}
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | cc/test/layer_tree_pixel_resource_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698