Lines Matching refs:resources
511 // Both frames' resources should be in the parent's resource provider.
516 EXPECT_EQ(2u, delegated_impl->Resources().size());
517 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
518 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
532 // Generate a frame with two resources in it.
563 // The resources in the quads should be remapped to the parent's namespace.
588 TransferableResourceArray resources;
593 // Generate a frame with two resources in it.
602 // Retrieve unused resources to the main thread.
603 // TODO(danakj): Shouldn't need to commit to get resources.
607 // All of the resources are in use.
608 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
609 EXPECT_EQ(0u, resources.size());
619 // Retrieve unused resources to the main thread.
620 // TODO(danakj): Shouldn't need to commit to get resources.
625 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
626 EXPECT_EQ(1u, resources.size());
627 EXPECT_EQ(555u, resources[0].id);
629 // Stop using any resources.
634 // Postpone collecting resources for a frame. They should still be there
640 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
641 EXPECT_EQ(2u, resources.size());
642 if (resources[0].id == 999) {
643 EXPECT_EQ(999u, resources[0].id);
644 EXPECT_EQ(444u, resources[1].id);
646 EXPECT_EQ(444u, resources[0].id);
647 EXPECT_EQ(999u, resources[1].id);
679 TransferableResourceArray resources;
684 // Generate a frame with some resources in it.
695 // Retrieve unused resources to the main thread.
696 // TODO(danakj): Shouldn't need to commit to get resources.
700 // All of the resources are in use.
701 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
702 EXPECT_EQ(0u, resources.size());
710 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
711 EXPECT_EQ(0u, resources.size());
720 // Retrieve unused resources to the main thread.
721 // TODO(danakj): Shouldn't need to commit to get resources.
726 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
727 EXPECT_EQ(1u, resources.size());
728 EXPECT_EQ(999u, resources[0].id);
753 TransferableResourceArray resources;
758 // Generate a frame with some resources in it.
769 // Retrieve unused resources to the main thread.
770 // TODO(danakj): Shouldn't need to commit to get resources.
774 // All of the resources are in use.
775 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
776 EXPECT_EQ(0u, resources.size());
784 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
785 EXPECT_EQ(0u, resources.size());
790 // Retrieve unused resources to the main thread.
791 // TODO(danakj): Shouldn't need to commit to get resources.
795 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
796 EXPECT_EQ(2u, resources.size());
797 if (resources[0].id == 555) {
798 EXPECT_EQ(555u, resources[0].id);
799 EXPECT_EQ(444u, resources[1].id);
801 EXPECT_EQ(444u, resources[0].id);
802 EXPECT_EQ(555u, resources[1].id);
834 EXPECT_EQ(1u, delegated_impl->Resources().size());
835 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
865 TransferableResourceArray resources;
870 // Generate a frame with some resources in it.
881 // Retrieve unused resources to the main thread.
882 // TODO(danakj): Shouldn't need to commit to get resources.
886 // All of the resources are in use.
887 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
888 EXPECT_EQ(0u, resources.size());
896 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
897 resources.size());
902 // Retrieve unused resources to the main thread.
903 // TODO(danakj): Shouldn't need to commit to get resources.
907 // The child compositor sends a frame before taking resources back
908 // from the previous commit. This frame makes use of the resources 555
916 // The resources are used by the new frame so are not returned.
917 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
918 EXPECT_EQ(0u, resources.size());
921 // Retrieve unused resources to the main thread.
922 // TODO(danakj): Shouldn't need to commit to get resources.
926 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
927 EXPECT_EQ(0u, resources.size());
945 // The third frame has all of the resources in it again, the delegated
946 // renderer layer should continue to own the resources for it.
952 EXPECT_EQ(3u, delegated_impl->Resources().size());
953 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
954 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
955 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(444)->second));
990 TransferableResourceArray resources;
995 // Generate a frame with some resources in it.
1004 // Retrieve unused resources to the main thread.
1005 // TODO(danakj): Shouldn't need to commit to get resources.
1009 // All of the resources are in use.
1010 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1011 EXPECT_EQ(0u, resources.size());
1014 // 885 and 775 resources are unknown, while ownership of the legit 444
1016 // previous resources, 999 or 555.
1028 // Retrieve unused resources to the main thread.
1029 // TODO(danakj): Shouldn't need to commit to get resources.
1034 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1035 EXPECT_EQ(1u, resources.size());
1036 EXPECT_EQ(444u, resources[0].id);
1044 // Retrieve unused resources to the main thread.
1045 // TODO(danakj): Shouldn't need to commit to get resources.
1050 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1051 EXPECT_EQ(1u, resources.size());
1052 EXPECT_EQ(555u, resources[0].id);
1082 EXPECT_EQ(2u, delegated_impl->Resources().size());
1083 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
1084 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1097 // We only keep resources from the last valid frame.
1102 EXPECT_EQ(2u, delegated_impl->Resources().size());
1103 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
1104 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1119 // Resources given to our parent compositor will be returned now, but
1122 // TODO(danakj): Shouldn't need a commit to return resources to the
1130 EXPECT_EQ(1u, delegated_impl->Resources().size());
1131 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
1157 TransferableResourceArray resources;
1162 // This frame includes two resources in it, but only uses one.
1171 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1172 EXPECT_EQ(1u, resources.size());
1173 EXPECT_EQ(999u, resources[0].id);
1196 EXPECT_EQ(1u, delegated_impl->Resources().size());
1197 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1214 TransferableResourceArray resources;
1219 // This frame includes two resources in it.
1234 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1235 EXPECT_EQ(1u, resources.size());
1236 EXPECT_EQ(999u, resources[0].id);
1259 EXPECT_EQ(1u, delegated_impl->Resources().size());
1260 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1273 TransferableResourceArray resources;
1278 // This frame includes two resources in it.
1287 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1288 EXPECT_EQ(0u, resources.size());
1298 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1299 EXPECT_EQ(0u, resources.size());
1307 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1308 EXPECT_EQ(1u, resources.size());
1309 EXPECT_EQ(999u, resources[0].id);
1334 EXPECT_EQ(2u, delegated_impl->Resources().size());
1335 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
1336 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1347 EXPECT_EQ(1u, delegated_impl->Resources().size());
1348 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1361 EXPECT_EQ(1u, delegated_impl->Resources().size());
1362 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1379 // Prevent drawing with resources that are sent to the grandparent.
1386 TransferableResourceArray resources;
1401 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1402 EXPECT_EQ(0u, resources.size());
1410 // Don't take resources here, but set a new frame that uses 999 again.
1418 delegated_->TakeUnusedResourcesForChildCompositor(&resources);
1419 EXPECT_EQ(1u, resources.size());
1420 EXPECT_EQ(444u, resources[0].id);
1446 EXPECT_EQ(3u, delegated_impl->Resources().size());
1447 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
1448 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1449 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(444)->second));
1455 EXPECT_EQ(1u, delegated_impl->Resources().size());
1456 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));
1463 EXPECT_EQ(2u, delegated_impl->Resources().size());
1464 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(999)->second));
1465 EXPECT_EQ(1u, delegated_impl->Resources().count(map.find(555)->second));