Lines Matching defs:occlusion

343                   typename Types::OcclusionTrackerType* occlusion) {
346 occlusion->EnterLayer(layer_iterator_);
350 typename Types::OcclusionTrackerType* occlusion) {
353 occlusion->LeaveLayer(layer_iterator_);
358 typename Types::OcclusionTrackerType* occlusion) {
359 EnterLayer(layer, occlusion);
360 LeaveLayer(layer, occlusion);
365 typename Types::OcclusionTrackerType* occlusion) {
368 occlusion->EnterLayer(layer_iterator_);
369 occlusion->LeaveLayer(layer_iterator_);
372 occlusion->EnterLayer(layer_iterator_);
377 typename Types::OcclusionTrackerType* occlusion) {
380 occlusion->LeaveLayer(layer_iterator_);
386 typename Types::OcclusionTrackerType* occlusion) {
387 EnterContributingSurface(layer, occlusion);
388 LeaveContributingSurface(layer, occlusion);
542 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
545 this->VisitLayer(layer, &occlusion);
546 this->EnterLayer(parent, &occlusion);
549 occlusion.occlusion_from_outside_target().ToString());
551 occlusion.occlusion_from_inside_target().ToString());
581 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
584 this->VisitLayer(layer, &occlusion);
585 this->EnterLayer(parent, &occlusion);
588 occlusion.occlusion_from_outside_target().ToString());
590 occlusion.occlusion_from_inside_target().ToString());
618 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
621 this->VisitLayer(layer, &occlusion);
622 this->EnterLayer(parent, &occlusion);
625 occlusion.occlusion_from_outside_target().ToString());
627 occlusion.occlusion_from_inside_target().ToString());
659 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
662 this->VisitLayer(layer, &occlusion);
663 this->EnterContributingSurface(child, &occlusion);
666 occlusion.occlusion_from_outside_target().ToString());
668 occlusion.occlusion_from_inside_target().ToString());
670 this->LeaveContributingSurface(child, &occlusion);
671 this->EnterLayer(parent, &occlusion);
674 occlusion.occlusion_from_outside_target().ToString());
676 occlusion.occlusion_from_inside_target().ToString());
678 /* Justification for the above occlusion from |layer|:
759 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
762 this->VisitLayer(occluder, &occlusion);
763 this->EnterLayer(layer2, &occlusion);
766 occlusion.occlusion_from_outside_target().ToString());
768 occlusion.occlusion_from_inside_target().ToString());
803 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
806 this->VisitLayer(top_layer, &occlusion);
809 occlusion.occlusion_from_outside_target().ToString());
811 occlusion.occlusion_from_inside_target().ToString());
813 this->VisitLayer(surface_child, &occlusion);
816 occlusion.occlusion_from_outside_target().ToString());
818 occlusion.occlusion_from_inside_target().ToString());
820 this->EnterContributingSurface(surface, &occlusion);
823 occlusion.occlusion_from_outside_target().ToString());
825 occlusion.occlusion_from_inside_target().ToString());
828 // with the occlusion from the |surface| we are leaving now.
829 this->LeaveContributingSurface(surface, &occlusion);
830 this->EnterLayer(root, &occlusion);
832 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
834 occlusion.occlusion_from_inside_target().ToString());
866 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
872 this->VisitLayer(layer, &occlusion);
873 this->EnterContributingSurface(child, &occlusion);
876 occlusion.occlusion_from_outside_target().ToString());
878 occlusion.occlusion_from_inside_target().ToString());
880 this->LeaveContributingSurface(child, &occlusion);
881 this->EnterLayer(parent, &occlusion);
884 occlusion.occlusion_from_outside_target().ToString());
886 occlusion.occlusion_from_inside_target().ToString());
930 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
933 this->VisitLayer(layer2, &occlusion);
934 this->VisitLayer(layer1, &occlusion);
935 this->VisitLayer(child, &occlusion);
936 this->EnterContributingSurface(child, &occlusion);
939 occlusion.occlusion_from_outside_target().ToString());
941 occlusion.occlusion_from_inside_target().ToString());
943 this->LeaveContributingSurface(child, &occlusion);
944 this->EnterLayer(parent, &occlusion);
947 occlusion.occlusion_from_outside_target().ToString());
949 occlusion.occlusion_from_inside_target().ToString());
951 /* Justification for the above occlusion from |layer1| and |layer2|:
1004 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1007 this->VisitLayer(layer2, &occlusion);
1008 this->EnterContributingSurface(child2, &occlusion);
1010 // layer2's occlusion.
1012 occlusion.occlusion_from_outside_target().ToString());
1014 occlusion.occlusion_from_inside_target().ToString());
1016 this->LeaveContributingSurface(child2, &occlusion);
1017 this->VisitLayer(layer1, &occlusion);
1018 this->EnterContributingSurface(child1, &occlusion);
1020 // layer2's occlusion in the target space of layer1.
1022 occlusion.occlusion_from_outside_target().ToString());
1023 // layer1's occlusion.
1025 occlusion.occlusion_from_inside_target().ToString());
1027 this->LeaveContributingSurface(child1, &occlusion);
1028 this->EnterLayer(parent, &occlusion);
1030 // The occlusion from from layer1 and layer2 is merged.
1031 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1033 occlusion.occlusion_from_inside_target().ToString());
1082 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1085 this->VisitLayer(layer2, &occlusion);
1086 this->EnterLayer(child2, &occlusion);
1089 occlusion.occlusion_from_outside_target().ToString());
1091 occlusion.occlusion_from_inside_target().ToString());
1093 this->LeaveLayer(child2, &occlusion);
1094 this->EnterContributingSurface(child2, &occlusion);
1097 occlusion.occlusion_from_outside_target().ToString());
1099 occlusion.occlusion_from_inside_target().ToString());
1101 this->LeaveContributingSurface(child2, &occlusion);
1102 this->VisitLayer(layer1, &occlusion);
1103 this->EnterContributingSurface(child1, &occlusion);
1106 occlusion.occlusion_from_outside_target().ToString());
1108 occlusion.occlusion_from_inside_target().ToString());
1110 this->LeaveContributingSurface(child1, &occlusion);
1111 this->EnterLayer(parent, &occlusion);
1114 occlusion.occlusion_from_outside_target().ToString());
1116 occlusion.occlusion_from_inside_target().ToString());
1118 /* Justification for the above occlusion:
1194 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1197 // Opacity layer won't contribute to occlusion.
1198 this->VisitLayer(opacity_layer, &occlusion);
1199 this->EnterContributingSurface(opacity_layer, &occlusion);
1201 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1202 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1205 this->LeaveContributingSurface(opacity_layer, &occlusion);
1206 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1207 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1209 // Opaque layer will contribute to occlusion.
1210 this->VisitLayer(opaque_layer, &occlusion);
1211 this->EnterContributingSurface(opaque_layer, &occlusion);
1213 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1215 occlusion.occlusion_from_inside_target().ToString());
1218 this->LeaveContributingSurface(opaque_layer, &occlusion);
1219 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1221 occlusion.occlusion_from_inside_target().ToString());
1223 // The blur layer needs to throw away any occlusion from outside its
1225 this->EnterLayer(blur_layer, &occlusion);
1226 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1227 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1229 // And it won't contribute to occlusion.
1230 this->LeaveLayer(blur_layer, &occlusion);
1231 this->EnterContributingSurface(blur_layer, &occlusion);
1232 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1233 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1235 // But the opaque layer's occlusion is preserved on the parent.
1236 this->LeaveContributingSurface(blur_layer, &occlusion);
1237 this->EnterLayer(parent, &occlusion);
1238 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1240 occlusion.occlusion_from_inside_target().ToString());
1261 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1264 this->VisitLayer(surface, &occlusion);
1267 occlusion.occlusion_from_inside_target().ToString());
1269 this->VisitContributingSurface(surface, &occlusion);
1270 this->EnterLayer(parent, &occlusion);
1274 occlusion.occlusion_from_inside_target().ToString());
1300 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1303 this->VisitLayer(surface, &occlusion);
1305 // The surface layer's occlusion in its own space.
1307 occlusion.occlusion_from_inside_target().ToString());
1308 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1310 this->VisitContributingSurface(surface, &occlusion);
1311 this->EnterLayer(parent, &occlusion);
1314 // replica's occlusion is clipped by the parent.
1316 occlusion.occlusion_from_inside_target().ToString());
1317 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1342 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1345 this->VisitLayer(surface, &occlusion);
1348 occlusion.occlusion_from_inside_target().ToString());
1350 this->VisitContributingSurface(surface, &occlusion);
1351 this->EnterLayer(parent, &occlusion);
1356 occlusion.occlusion_from_inside_target().ToString());
1379 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1381 this->EnterLayer(layer, &occlusion);
1383 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1384 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1386 this->LeaveLayer(layer, &occlusion);
1387 this->VisitContributingSurface(layer, &occlusion);
1388 this->EnterLayer(parent, &occlusion);
1390 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1391 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1414 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1419 this->VisitLayer(layer, &occlusion);
1420 this->EnterLayer(parent, &occlusion);
1423 occlusion.occlusion_from_inside_target().ToString());
1426 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1431 this->VisitLayer(layer, &occlusion);
1432 this->EnterLayer(parent, &occlusion);
1435 occlusion.occlusion_from_inside_target().ToString());
1438 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1443 this->VisitLayer(layer, &occlusion);
1444 this->EnterLayer(parent, &occlusion);
1447 occlusion.occlusion_from_inside_target().ToString());
1463 // thread. Because of this, the occlusion tracker cannot assume that a 3d
1466 // occlusion to the occlusion tracker.
1490 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1492 this->VisitLayer(child2, &occlusion);
1493 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1494 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1496 this->VisitLayer(child1, &occlusion);
1497 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1498 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1530 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1534 this->VisitLayer(layer, &occlusion);
1535 this->EnterLayer(parent, &occlusion);
1536 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1537 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
1541 // This test requires accumulating occlusion of 3d layers, which are skipped by
1542 // the occlusion tracker on the main thread. So this test should run on the impl
1571 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1577 this->VisitLayer(layer, &occlusion);
1578 this->EnterLayer(parent, &occlusion);
1580 occlusion.occlusion_from_inside_target().ToString());
1582 occlusion.occlusion_from_outside_target().ToString());
1586 // This test requires accumulating occlusion of 3d layers, which are skipped by
1587 // the occlusion tracker on the main thread. So this test should run on the impl
1655 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1658 this->VisitLayer(topmost, &occlusion);
1659 this->EnterLayer(parent2, &occlusion);
1661 // This occlusion will affect all surfaces.
1663 occlusion.occlusion_from_outside_target().ToString());
1665 occlusion.occlusion_from_inside_target().ToString());
1667 this->LeaveLayer(parent2, &occlusion);
1668 this->VisitLayer(surface_child2, &occlusion);
1669 this->EnterLayer(surface_child, &occlusion);
1671 occlusion.occlusion_from_outside_target().ToString());
1673 occlusion.occlusion_from_inside_target().ToString());
1675 this->LeaveLayer(surface_child, &occlusion);
1676 this->EnterLayer(surface, &occlusion);
1678 occlusion.occlusion_from_outside_target().ToString());
1680 occlusion.occlusion_from_inside_target().ToString());
1682 this->LeaveLayer(surface, &occlusion);
1683 this->EnterContributingSurface(surface, &occlusion);
1686 occlusion.occlusion_from_outside_target().ToString());
1688 occlusion.occlusion_from_inside_target().ToString());
1690 this->LeaveContributingSurface(surface, &occlusion);
1693 occlusion.occlusion_from_inside_target().ToString());
1695 occlusion.occlusion_from_outside_target().ToString());
1697 this->VisitLayer(layer, &occlusion);
1698 this->EnterLayer(parent, &occlusion);
1702 occlusion.occlusion_from_inside_target().ToString());
1704 occlusion.occlusion_from_outside_target().ToString());
1766 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1769 this->VisitLayer(topmost, &occlusion);
1770 this->EnterLayer(parent2, &occlusion);
1771 // This occlusion will affect all surfaces.
1773 occlusion.occlusion_from_inside_target().ToString());
1775 occlusion.occlusion_from_outside_target().ToString());
1777 this->LeaveLayer(parent2, &occlusion);
1778 this->VisitLayer(surface_child2, &occlusion);
1779 this->EnterLayer(surface_child, &occlusion);
1781 occlusion.occlusion_from_inside_target().ToString());
1783 occlusion.occlusion_from_outside_target().ToString());
1785 this->LeaveLayer(surface_child, &occlusion);
1786 this->EnterLayer(surface, &occlusion);
1788 occlusion.occlusion_from_inside_target().ToString());
1790 occlusion.occlusion_from_outside_target().ToString());
1792 this->LeaveLayer(surface, &occlusion);
1793 this->EnterContributingSurface(surface, &occlusion);
1796 occlusion.occlusion_from_inside_target().ToString());
1798 occlusion.occlusion_from_outside_target().ToString());
1800 this->LeaveContributingSurface(surface, &occlusion);
1803 occlusion.occlusion_from_inside_target().ToString());
1805 occlusion.occlusion_from_outside_target().ToString());
1807 this->VisitLayer(layer, &occlusion);
1808 this->EnterLayer(parent, &occlusion);
1812 occlusion.occlusion_from_inside_target().ToString());
1814 occlusion.occlusion_from_outside_target().ToString());
1877 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1880 this->VisitLayer(surface2, &occlusion);
1881 this->EnterContributingSurface(surface2, &occlusion);
1884 occlusion.occlusion_from_inside_target().ToString());
1886 this->LeaveContributingSurface(surface2, &occlusion);
1887 this->EnterLayer(surface_child2, &occlusion);
1889 // so occlusion should happen in its target space only. It also means that
1893 occlusion.occlusion_from_outside_target().ToString());
1895 occlusion.occlusion_from_inside_target().ToString());
1897 this->LeaveLayer(surface_child2, &occlusion);
1898 this->EnterLayer(surface_child, &occlusion);
1899 // surface_child2 added to the occlusion since it is not moving relative
1902 occlusion.occlusion_from_outside_target().ToString());
1904 occlusion.occlusion_from_inside_target().ToString());
1906 this->LeaveLayer(surface_child, &occlusion);
1908 // occlusion.
1910 occlusion.occlusion_from_outside_target().ToString());
1912 occlusion.occlusion_from_inside_target().ToString());
1914 this->EnterLayer(surface, &occlusion);
1916 occlusion.occlusion_from_outside_target().ToString());
1918 occlusion.occlusion_from_inside_target().ToString());
1920 this->LeaveLayer(surface, &occlusion);
1922 // its target, so it adds to the occlusion.
1924 occlusion.occlusion_from_outside_target().ToString());
1926 occlusion.occlusion_from_inside_target().ToString());
1928 this->EnterContributingSurface(surface, &occlusion);
1929 this->LeaveContributingSurface(surface, &occlusion);
1930 // The |surface| is moving in the screen and in its target, so all occlusion
1931 // within the surface is lost when leaving it. Only the |surface2| occlusion
1934 occlusion.occlusion_from_outside_target().ToString());
1936 occlusion.occlusion_from_inside_target().ToString());
1938 this->VisitLayer(layer, &occlusion);
1939 // The |layer| is animating in the screen and in its target, so no occlusion
1942 occlusion.occlusion_from_outside_target().ToString());
1944 occlusion.occlusion_from_inside_target().ToString());
1977 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
1980 this->VisitLayer(surface2, &occlusion);
1981 this->VisitContributingSurface(surface2, &occlusion);
1984 occlusion.occlusion_from_outside_target().ToString());
1986 occlusion.occlusion_from_inside_target().ToString());
1988 // Clear any stored occlusion.
1989 occlusion.set_occlusion_from_outside_target(SimpleEnclosedRegion());
1990 occlusion.set_occlusion_from_inside_target(SimpleEnclosedRegion());
1992 this->VisitLayer(surface, &occlusion);
1993 this->VisitContributingSurface(surface, &occlusion);
1996 occlusion.occlusion_from_outside_target().ToString());
1998 occlusion.occlusion_from_inside_target().ToString());
2025 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2028 this->VisitLayer(surface, &occlusion);
2029 this->VisitContributingSurface(surface, &occlusion);
2032 occlusion.occlusion_from_outside_target().ToString());
2034 occlusion.occlusion_from_inside_target().ToString());
2068 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2072 this->VisitLayer(topmost, &occlusion);
2075 occlusion.occlusion_from_outside_target().ToString());
2077 occlusion.occlusion_from_inside_target().ToString());
2079 this->VisitLayer(surface, &occlusion);
2081 // Render target with replica ignores occlusion from outside.
2083 occlusion.occlusion_from_outside_target().ToString());
2085 occlusion.occlusion_from_inside_target().ToString());
2087 this->EnterContributingSurface(surface, &occlusion);
2089 // Only occlusion from outside the surface occludes the surface/replica.
2091 occlusion.occlusion_on_contributing_surface_from_outside_target()
2094 occlusion.occlusion_on_contributing_surface_from_inside_target()
2129 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2132 // |topmost| occludes everything partially so we know occlusion is happening
2134 this->VisitLayer(topmost, &occlusion);
2137 occlusion.occlusion_from_outside_target().ToString());
2139 occlusion.occlusion_from_inside_target().ToString());
2141 this->VisitLayer(surface_child, &occlusion);
2143 // surface_child increases the occlusion in the screen by a narrow sliver.
2145 occlusion.occlusion_from_outside_target().ToString());
2146 // In its own surface, surface_child is at 0,0 as is its occlusion.
2148 occlusion.occlusion_from_inside_target().ToString());
2156 this->EnterContributingSurface(surface_child, &occlusion);
2157 // The |surface_child| can't occlude its own surface, but occlusion from
2160 occlusion.occlusion_on_contributing_surface_from_outside_target()
2163 occlusion.occlusion_on_contributing_surface_from_inside_target()
2165 this->LeaveContributingSurface(surface_child, &occlusion);
2167 // When the surface_child's occlusion is transformed up to its parent, make
2169 this->EnterLayer(surface, &occlusion);
2171 occlusion.occlusion_from_outside_target().ToString());
2173 occlusion.occlusion_from_inside_target().ToString());
2174 this->LeaveLayer(surface, &occlusion);
2176 this->EnterContributingSurface(surface, &occlusion);
2177 // The occlusion from inside |surface| can't affect the surface, but
2180 occlusion.occlusion_on_contributing_surface_from_outside_target()
2183 occlusion.occlusion_on_contributing_surface_from_inside_target()
2186 this->LeaveContributingSurface(surface, &occlusion);
2187 this->EnterLayer(parent, &occlusion);
2188 // The occlusion in |surface| and without are merged into the parent.
2190 occlusion.occlusion_from_outside_target().ToString());
2192 occlusion.occlusion_from_inside_target().ToString());
2266 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2272 this->VisitLayer(occluding_layer, &occlusion);
2275 occlusion.occlusion_from_inside_target().ToString());
2276 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
2278 this->VisitLayer(filtered_surface, &occlusion);
2280 // The occlusion is used fully inside the surface.
2283 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
2285 occlusion.occlusion_from_outside_target().ToString());
2291 this->VisitContributingSurface(filtered_surface, &occlusion);
2292 this->EnterLayer(parent, &occlusion);
2311 occlusion.occlusion_from_inside_target().ToString());
2312 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
2333 // Makes two surfaces that completely cover |parent|. The occlusion both
2364 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2367 this->VisitLayer(occluding_layer_above, &occlusion);
2369 occlusion.occlusion_from_outside_target().ToString());
2371 occlusion.occlusion_from_inside_target().ToString());
2373 this->VisitLayer(filtered_surface2, &occlusion);
2374 this->VisitContributingSurface(filtered_surface2, &occlusion);
2375 this->VisitLayer(filtered_surface1, &occlusion);
2376 this->VisitContributingSurface(filtered_surface1, &occlusion);
2385 occlusion.occlusion_from_inside_target().ToString());
2390 occlusion.occlusion_from_outside_target().ToString());
2444 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2449 this->VisitLayer(filtered_surface, &occlusion);
2450 this->VisitContributingSurface(filtered_surface, &occlusion);
2452 this->VisitLayer(behind_replica_layer, &occlusion);
2454 // The layers behind the surface are not blurred, and their occlusion does
2459 occlusion.occlusion_from_inside_target().ToString());
2460 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
2462 // Clear the occlusion so the |behind_surface_layer| can add its occlusion
2463 // without existing occlusion interfering.
2464 occlusion.set_occlusion_from_inside_target(SimpleEnclosedRegion());
2466 this->VisitLayer(behind_surface_layer, &occlusion);
2468 // The layers behind the surface are not blurred, and their occlusion does
2473 occlusion.occlusion_from_inside_target().ToString());
2474 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
2518 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2521 this->VisitLayer(occluding_layer, &occlusion);
2523 this->VisitLayer(filtered_surface, &occlusion);
2529 occlusion.occlusion_from_inside_target().ToString());
2531 occlusion.occlusion_from_outside_target().ToString());
2536 this->VisitContributingSurface(filtered_surface, &occlusion);
2539 // reduce any occlusion.
2543 occlusion.occlusion_from_inside_target().ToString());
2545 occlusion.occlusion_from_outside_target().ToString());
2619 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2622 this->VisitLayer(beside_replica_layer, &occlusion);
2623 this->VisitLayer(beside_surface_layer, &occlusion);
2624 this->VisitLayer(above_replica_layer, &occlusion);
2625 this->VisitLayer(above_surface_layer, &occlusion);
2629 this->VisitLayer(filtered_surface, &occlusion);
2630 this->VisitContributingSurface(filtered_surface, &occlusion);
2633 // unoccluded parts should reduce occlusion. This means it will push back
2634 // the occlusion that touches the unoccluded part (occlusion_above___), but
2652 occlusion.occlusion_from_inside_target().ToString());
2653 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
2656 occlusion.occlusion_from_inside_target();
2689 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2691 occlusion.set_minimum_tracking_size(tracking_size);
2694 this->VisitLayer(small, &occlusion);
2697 occlusion.occlusion_from_outside_target().ToString());
2699 occlusion.occlusion_from_inside_target().ToString());
2702 this->VisitLayer(large, &occlusion);
2705 occlusion.occlusion_from_outside_target().ToString());
2707 occlusion.occlusion_from_inside_target().ToString());
2736 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2739 this->VisitLayer(scaled, &occlusion);
2742 occlusion.occlusion_from_outside_target().ToString());
2744 occlusion.occlusion_from_inside_target().ToString());
2775 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2778 this->VisitLayer(scaled, &occlusion);
2779 this->VisitLayer(surface, &occlusion);
2780 this->VisitContributingSurface(surface, &occlusion);
2783 occlusion.occlusion_from_outside_target().ToString());
2785 occlusion.occlusion_from_inside_target().ToString());
2815 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2818 this->VisitLayer(copy_child, &occlusion);
2820 occlusion.occlusion_from_outside_target().ToString());
2822 occlusion.occlusion_from_inside_target().ToString());
2825 this->VisitContributingSurface(copy, &occlusion);
2827 // The occlusion from the copy should be kept.
2829 occlusion.occlusion_from_outside_target().ToString());
2831 occlusion.occlusion_from_inside_target().ToString());
2863 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2866 this->VisitLayer(copy_child, &occlusion);
2868 occlusion.occlusion_from_outside_target().ToString());
2870 occlusion.occlusion_from_inside_target().ToString());
2873 this->VisitContributingSurface(copy, &occlusion);
2875 // The occlusion from the copy should be dropped since it is hidden.
2877 occlusion.occlusion_from_outside_target().ToString());
2879 occlusion.occlusion_from_inside_target().ToString());
2903 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2905 this->VisitLayer(outside_layer, &occlusion);
2906 this->EnterLayer(layer, &occlusion);
2908 // No occlusion, is not occluded.
2909 occlusion.set_occlusion_from_outside_target(SimpleEnclosedRegion());
2910 occlusion.set_occlusion_from_inside_target(SimpleEnclosedRegion());
2911 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(100, 100)));
2913 // Partial occlusion from outside, is not occluded.
2914 occlusion.set_occlusion_from_outside_target(
2916 occlusion.set_occlusion_from_inside_target(SimpleEnclosedRegion());
2917 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 0, 100, 100)));
2918 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 30, 100, 100)));
2919 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(40, 0, 100, 100)));
2920 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(40, 80, 100, 100)));
2921 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 0, 80, 100)));
2922 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 80, 100, 100)));
2923 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 80, 100, 100)));
2924 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 0, 100, 100)));
2926 // Full occlusion from outside, is occluded.
2927 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(40, 30, 100, 100)));
2928 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(40, 30, 10, 10)));
2929 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(130, 120, 10, 10)));
2930 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(80, 70, 50, 50)));
2932 // Partial occlusion from inside, is not occluded.
2933 occlusion.set_occlusion_from_outside_target(SimpleEnclosedRegion());
2934 occlusion.set_occlusion_from_inside_target(
2936 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 0, 100, 100)));
2937 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 30, 100, 100)));
2938 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(40, 0, 100, 100)));
2939 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(40, 80, 100, 100)));
2940 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 0, 80, 100)));
2941 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 80, 100, 100)));
2942 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 80, 100, 100)));
2943 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 0, 100, 100)));
2945 // Full occlusion from inside, is occluded.
2946 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(40, 30, 100, 100)));
2947 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(40, 30, 10, 10)));
2948 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(130, 120, 10, 10)));
2949 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(80, 70, 50, 50)));
2951 // Partial occlusion from both, is not occluded.
2952 occlusion.set_occlusion_from_outside_target(
2954 occlusion.set_occlusion_from_inside_target(
2956 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 0, 100, 100)));
2957 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 30, 100, 100)));
2958 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(40, 0, 100, 100)));
2959 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(40, 80, 100, 100)));
2960 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 0, 80, 100)));
2961 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 80, 100, 100)));
2962 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(0, 80, 100, 100)));
2963 EXPECT_FALSE(occlusion.OccludedLayer(layer, gfx::Rect(90, 0, 100, 100)));
2965 // Full occlusion from both, is occluded.
2966 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(40, 30, 100, 100)));
2967 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(40, 30, 10, 10)));
2968 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(130, 120, 10, 10)));
2969 EXPECT_TRUE(occlusion.OccludedLayer(layer, gfx::Rect(80, 70, 50, 50)));
2994 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
2996 this->VisitLayer(outside_layer, &occlusion);
2997 this->EnterLayer(layer, &occlusion);
2999 // No occlusion, is not occluded.
3000 occlusion.set_occlusion_from_outside_target(SimpleEnclosedRegion());
3001 occlusion.set_occlusion_from_inside_target(SimpleEnclosedRegion());
3003 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(100, 100)));
3005 // Partial occlusion from outside.
3006 occlusion.set_occlusion_from_outside_target(
3008 occlusion.set_occlusion_from_inside_target(SimpleEnclosedRegion());
3011 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(0, 0, 100, 100)));
3013 occlusion.UnoccludedLayerContentRect(
3016 occlusion.UnoccludedLayerContentRect(layer,
3019 occlusion.UnoccludedLayerContentRect(
3023 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(0, 0, 80, 100)));
3025 occlusion.UnoccludedLayerContentRect(
3028 occlusion.UnoccludedLayerContentRect(layer,
3031 occlusion.UnoccludedLayerContentRect(layer,
3034 // Full occlusion from outside, is occluded.
3036 occlusion.UnoccludedLayerContentRect(
3040 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(40, 30, 10, 10)));
3042 occlusion.UnoccludedLayerContentRect(
3046 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(80, 70, 50, 50)));
3048 // Partial occlusion from inside, is not occluded.
3049 occlusion.set_occlusion_from_outside_target(SimpleEnclosedRegion());
3050 occlusion.set_occlusion_from_inside_target(
3054 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(0, 0, 100, 100)));
3056 occlusion.UnoccludedLayerContentRect(
3059 occlusion.UnoccludedLayerContentRect(layer,
3062 occlusion.UnoccludedLayerContentRect(
3066 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(0, 0, 80, 100)));
3068 occlusion.UnoccludedLayerContentRect(
3071 occlusion.UnoccludedLayerContentRect(layer,
3074 occlusion.UnoccludedLayerContentRect(layer,
3077 // Full occlusion from inside, is occluded.
3079 occlusion.UnoccludedLayerContentRect(
3083 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(40, 30, 10, 10)));
3085 occlusion.UnoccludedLayerContentRect(
3089 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(80, 70, 50, 50)));
3091 // Partial occlusion from both, is not occluded.
3092 occlusion.set_occlusion_from_outside_target(
3094 occlusion.set_occlusion_from_inside_target(
3098 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(0, 0, 100, 100)));
3102 occlusion.UnoccludedLayerContentRect(
3105 occlusion.UnoccludedLayerContentRect(layer,
3108 occlusion.UnoccludedLayerContentRect(
3112 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(0, 0, 80, 100)));
3114 occlusion.UnoccludedLayerContentRect(
3117 occlusion.UnoccludedLayerContentRect(layer,
3120 occlusion.UnoccludedLayerContentRect(layer,
3123 // Full occlusion from both, is occluded.
3125 occlusion.UnoccludedLayerContentRect(
3129 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(40, 30, 10, 10)));
3131 occlusion.UnoccludedLayerContentRect(
3135 occlusion.UnoccludedLayerContentRect(layer, gfx::Rect(80, 70, 50, 50)));
3164 TestOcclusionTrackerWithClip<typename Types::LayerType> occlusion(
3166 this->VisitLayer(outside_layer, &occlusion);
3167 this->VisitLayer(layer, &occlusion);
3168 this->EnterContributingSurface(surface, &occlusion);
3170 // No occlusion, is not occluded.
3171 occlusion.set_occlusion_on_contributing_surface_from_outside_target(
3173 occlusion.set_occlusion_on_contributing_surface_from_inside_target(
3177 occlusion.UnoccludedSurfaceContentRect(surface, gfx::Rect(100, 100)));
3179 // Partial occlusion from outside.
3180 occlusion.set_occlusion_on_contributing_surface_from_outside_target(
3182 occlusion.set_occlusion_on_contributing_surface_from_inside_target(
3185 occlusion.UnoccludedSurfaceContentRect(
3188 occlusion.UnoccludedSurfaceContentRect(
3191 occlusion.UnoccludedSurfaceContentRect(
3194 occlusion.UnoccludedSurfaceContentRect(
3197 occlusion.UnoccludedSurfaceContentRect(surface,
3200 occlusion.UnoccludedSurfaceContentRect(
3203 occlusion.UnoccludedSurfaceContentRect(
3206 occlusion.UnoccludedSurfaceContentRect(
3209 // Full occlusion from outside, is occluded.
3211 occlusion.UnoccludedSurfaceContentRect(
3214 occlusion.UnoccludedSurfaceContentRect(
3217 occlusion.UnoccludedSurfaceContentRect(
3220 occlusion.UnoccludedSurfaceContentRect(
3223 // Partial occlusion from inside, is not occluded.
3224 occlusion.set_occlusion_on_contributing_surface_from_outside_target(
3226 occlusion.set_occlusion_on_contributing_surface_from_inside_target(
3229 occlusion.UnoccludedSurfaceContentRect(
3232 occlusion.UnoccludedSurfaceContentRect(
3235 occlusion.UnoccludedSurfaceContentRect(
3238 occlusion.UnoccludedSurfaceContentRect(
3241 occlusion.UnoccludedSurfaceContentRect(surface,
3244 occlusion.UnoccludedSurfaceContentRect(
3247 occlusion.UnoccludedSurfaceContentRect(
3250 occlusion.UnoccludedSurfaceContentRect(
3253 // Full occlusion from inside, is occluded.
3255 occlusion.UnoccludedSurfaceContentRect(
3258 occlusion.UnoccludedSurfaceContentRect(
3261 occlusion.UnoccludedSurfaceContentRect(
3264 occlusion.UnoccludedSurfaceContentRect(
3267 // Partial occlusion from both, is not occluded.
3268 occlusion.set_occlusion_on_contributing_surface_from_outside_target(
3270 occlusion.set_occlusion_on_contributing_surface_from_inside_target(
3273 occlusion.UnoccludedSurfaceContentRect(
3278 occlusion.UnoccludedSurfaceContentRect(
3281 occlusion.UnoccludedSurfaceContentRect(
3284 occlusion.UnoccludedSurfaceContentRect(
3287 occlusion.UnoccludedSurfaceContentRect(surface,
3290 occlusion.UnoccludedSurfaceContentRect(
3293 occlusion.UnoccludedSurfaceContentRect(
3296 occlusion.UnoccludedSurfaceContentRect(
3299 // Full occlusion from both, is occluded.
3301 occlusion.UnoccludedSurfaceContentRect(
3304 occlusion.UnoccludedSurfaceContentRect(
3307 occlusion.UnoccludedSurfaceContentRect(
3310 occlusion.UnoccludedSurfaceContentRect(