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

Unified Diff: cc/resources/resource_pool_unittest.cc

Issue 2254033002: Encourage IOSurface reuse for CSS filter effects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from ericrk. Created 4 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/test/fake_picture_layer_tiling_client.cc » ('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 5c9d0dada9369c6eb801b54423a7a1bf7aefd3f2..1bec8db26740db237d18d4af234387f67cd88020 100644
--- a/cc/resources/resource_pool_unittest.cc
+++ b/cc/resources/resource_pool_unittest.cc
@@ -28,7 +28,8 @@ class ResourcePoolTest : public testing::Test {
output_surface_.get(), shared_bitmap_manager_.get());
task_runner_ = base::ThreadTaskRunnerHandle::Get();
resource_pool_ =
- ResourcePool::Create(resource_provider_.get(), task_runner_.get());
+ ResourcePool::Create(resource_provider_.get(), task_runner_.get(),
+ ResourcePool::kDefaultExpirationDelay);
}
protected:
@@ -155,16 +156,17 @@ TEST_F(ResourcePoolTest, LostResource) {
}
TEST_F(ResourcePoolTest, BusyResourcesEventuallyFreed) {
+ // Set a quick resource expiration delay so that this test doesn't take long
+ // to run.
+ resource_pool_ =
+ ResourcePool::Create(resource_provider_.get(), task_runner_.get(),
+ base::TimeDelta::FromMilliseconds(10));
+
// Limits high enough to not be hit by this test.
size_t bytes_limit = 10 * 1024 * 1024;
size_t count_limit = 100;
resource_pool_->SetResourceUsageLimits(bytes_limit, count_limit);
- // Set a quick resource expiration delay so that this test doesn't take long
- // to run.
- resource_pool_->SetResourceExpirationDelayForTesting(
- base::TimeDelta::FromMilliseconds(10));
-
gfx::Size size(100, 100);
ResourceFormat format = RGBA_8888;
gfx::ColorSpace color_space;
@@ -194,16 +196,17 @@ TEST_F(ResourcePoolTest, BusyResourcesEventuallyFreed) {
}
TEST_F(ResourcePoolTest, UnusedResourcesEventuallyFreed) {
+ // Set a quick resource expiration delay so that this test doesn't take long
+ // to run.
+ resource_pool_ =
+ ResourcePool::Create(resource_provider_.get(), task_runner_.get(),
+ base::TimeDelta::FromMilliseconds(100));
+
// Limits high enough to not be hit by this test.
size_t bytes_limit = 10 * 1024 * 1024;
size_t count_limit = 100;
resource_pool_->SetResourceUsageLimits(bytes_limit, count_limit);
- // Set a quick resource expiration delay so that this test doesn't take long
- // to run.
- resource_pool_->SetResourceExpirationDelayForTesting(
- base::TimeDelta::FromMilliseconds(100));
-
gfx::Size size(100, 100);
ResourceFormat format = RGBA_8888;
gfx::ColorSpace color_space;
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698