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

Unified Diff: cc/resources/resource_pool_unittest.cc

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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());
}
« 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