Index: cc/resources/resource_pool_unittest.cc |
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc |
index f280f49d1421a4b93878a19fad5305e25d05c2fc..035b19e3cf7a87d8258b8ed44b710fbc35dfa94f 100644 |
--- a/cc/resources/resource_pool_unittest.cc |
+++ b/cc/resources/resource_pool_unittest.cc |
@@ -71,7 +71,8 @@ |
EXPECT_EQ(1u, resource_pool_->total_resource_count()); |
EXPECT_EQ(1u, resource_pool_->busy_resource_count()); |
- resource_pool_->CheckBusyResources(); |
+ bool wait_if_needed = false; |
+ resource_pool_->CheckBusyResources(wait_if_needed); |
EXPECT_EQ(resource_bytes, resource_pool_->total_memory_usage_bytes()); |
EXPECT_EQ(0u, resource_pool_->acquired_memory_usage_bytes()); |
EXPECT_EQ(1u, resource_pool_->total_resource_count()); |
@@ -95,25 +96,26 @@ |
gfx::Size size(100, 100); |
ResourceFormat format = RGBA_8888; |
+ bool wait_if_needed = false; |
scoped_ptr<ScopedResource> resource = |
resource_pool_->AcquireResource(size, format); |
resource_pool_->ReleaseResource(resource.Pass(), 0u); |
- resource_pool_->CheckBusyResources(); |
+ resource_pool_->CheckBusyResources(wait_if_needed); |
EXPECT_EQ(1u, resource_provider_->num_resources()); |
// Same size/format should re-use resource. |
resource = resource_pool_->AcquireResource(size, format); |
EXPECT_EQ(1u, resource_provider_->num_resources()); |
resource_pool_->ReleaseResource(resource.Pass(), 0u); |
- resource_pool_->CheckBusyResources(); |
+ resource_pool_->CheckBusyResources(wait_if_needed); |
EXPECT_EQ(1u, resource_provider_->num_resources()); |
// Different size/format should alloate new resource. |
resource = resource_pool_->AcquireResource(gfx::Size(50, 50), LUMINANCE_8); |
EXPECT_EQ(2u, resource_provider_->num_resources()); |
resource_pool_->ReleaseResource(resource.Pass(), 0u); |
- resource_pool_->CheckBusyResources(); |
+ resource_pool_->CheckBusyResources(wait_if_needed); |
EXPECT_EQ(2u, resource_provider_->num_resources()); |
} |
@@ -125,6 +127,7 @@ |
gfx::Size size(100, 100); |
ResourceFormat format = RGBA_8888; |
+ bool wait_if_needed = false; |
scoped_ptr<ScopedResource> resource = |
resource_pool_->AcquireResource(size, format); |
@@ -132,7 +135,7 @@ |
resource_provider_->LoseResourceForTesting(resource->id()); |
resource_pool_->ReleaseResource(resource.Pass(), 0u); |
- resource_pool_->CheckBusyResources(); |
+ resource_pool_->CheckBusyResources(wait_if_needed); |
EXPECT_EQ(0u, resource_provider_->num_resources()); |
} |