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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2744423002: Handle large rects better. (Closed)
Patch Set: Rebased on size patch Created 3 years, 9 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/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index e43a988097021b8298e141632795dc6187f7a5db..50312cdd47c4805e3dda7d320456c30bfddcb497 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -1124,9 +1124,14 @@ TEST_F(LayerTreeHostCommonTest, LayerFullyContainedWithinClipInTargetSpace) {
page_scale_layer, inner_viewport_scroll_layer,
outer_viewport_scroll_layer);
- // Mapping grand_child's bounds to screen space produces an empty rect so
- // grand_child should be hidden.
- EXPECT_EQ(gfx::Rect(), grand_child->visible_layer_rect());
+ // Mapping grand_child's bounds to screen space produces an empty rect, but
+ // only because it is turned sideways. The entire rect is contained inside
+ // the clip, and is only empty so land as the numerical precision of the
Peter Mayo 2017/03/28 20:15:40 s/land/long/ Done.
+ // transform is effectively perfect. Currently we do the calculation the
+ // way around, and the Projection of the screen space clip into layer space
jaydasika 2017/03/28 20:11:48 nit : the 'other' way around ?
Peter Mayo 2017/03/28 20:15:40 Done.
+ // includes the entire bounds.
+ EXPECT_EQ(gfx::Rect(grand_child->bounds()),
+ grand_child->visible_layer_rect());
}
TEST_F(LayerTreeHostCommonTest, TransformsForDegenerateIntermediateLayer) {

Powered by Google App Engine
This is Rietveld 408576698