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

Unified Diff: cc/resources/resource_pool_unittest.cc

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 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/resources/resource_pool.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_pool_unittest.cc
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc
index 610bee96784741c6dbe88c52c0c4f56efd56d6d5..f55c9b379be766af1fb253eae21a0761b3cccac3 100644
--- a/cc/resources/resource_pool_unittest.cc
+++ b/cc/resources/resource_pool_unittest.cc
@@ -69,8 +69,7 @@ TEST_F(ResourcePoolTest, AccountingSingleResource) {
EXPECT_EQ(1u, resource_pool_->total_resource_count());
EXPECT_EQ(1u, resource_pool_->busy_resource_count());
- bool wait_if_needed = false;
- resource_pool_->CheckBusyResources(wait_if_needed);
+ resource_pool_->CheckBusyResources();
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());
@@ -94,25 +93,24 @@ TEST_F(ResourcePoolTest, SimpleResourceReuse) {
gfx::Size size(100, 100);
ResourceFormat format = RGBA_8888;
- bool wait_if_needed = false;
Resource* resource = resource_pool_->AcquireResource(size, format);
resource_pool_->ReleaseResource(resource, 0u);
- resource_pool_->CheckBusyResources(wait_if_needed);
+ resource_pool_->CheckBusyResources();
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, 0u);
- resource_pool_->CheckBusyResources(wait_if_needed);
+ resource_pool_->CheckBusyResources();
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, 0u);
- resource_pool_->CheckBusyResources(wait_if_needed);
+ resource_pool_->CheckBusyResources();
EXPECT_EQ(2u, resource_provider_->num_resources());
}
@@ -124,14 +122,13 @@ TEST_F(ResourcePoolTest, LostResource) {
gfx::Size size(100, 100);
ResourceFormat format = RGBA_8888;
- bool wait_if_needed = false;
Resource* resource = resource_pool_->AcquireResource(size, format);
EXPECT_EQ(1u, resource_provider_->num_resources());
resource_provider_->LoseResourceForTesting(resource->id());
resource_pool_->ReleaseResource(resource, 0u);
- resource_pool_->CheckBusyResources(wait_if_needed);
+ resource_pool_->CheckBusyResources();
EXPECT_EQ(0u, resource_provider_->num_resources());
}
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698