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

Unified Diff: cc/resources/scoped_resource_unittest.cc

Issue 486853002: cc: Use a normal texture for background texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits in unittests Created 6 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/scoped_resource.cc ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/scoped_resource_unittest.cc
diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc
index 50422213736819d752282e8bc30b75ebde79acfe..5b5f143ed2c20e12436124290bd568652d9a72e4 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -45,9 +45,8 @@ TEST(ScopedResourceTest, CreateScopedResource) {
output_surface.get(), shared_bitmap_manager.get(), 0, false, 1, false));
scoped_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
- texture->Allocate(gfx::Size(30, 30),
- ResourceProvider::TextureUsageAny,
- RGBA_8888);
+ texture->Allocate(
+ gfx::Size(30, 30), ResourceProvider::TextureHintImmutable, RGBA_8888);
// The texture has an allocated byte-size now.
size_t expected_bytes = 30 * 30 * 4;
@@ -72,9 +71,8 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
ScopedResource::Create(resource_provider.get());
EXPECT_EQ(0u, resource_provider->num_resources());
- texture->Allocate(gfx::Size(30, 30),
- ResourceProvider::TextureUsageAny,
- RGBA_8888);
+ texture->Allocate(
+ gfx::Size(30, 30), ResourceProvider::TextureHintImmutable, RGBA_8888);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resource_provider->num_resources());
}
@@ -84,9 +82,8 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
scoped_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
EXPECT_EQ(0u, resource_provider->num_resources());
- texture->Allocate(gfx::Size(30, 30),
- ResourceProvider::TextureUsageAny,
- RGBA_8888);
+ texture->Allocate(
+ gfx::Size(30, 30), ResourceProvider::TextureHintImmutable, RGBA_8888);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resource_provider->num_resources());
texture->Free();
@@ -108,9 +105,8 @@ TEST(ScopedResourceTest, LeakScopedResource) {
ScopedResource::Create(resource_provider.get());
EXPECT_EQ(0u, resource_provider->num_resources());
- texture->Allocate(gfx::Size(30, 30),
- ResourceProvider::TextureUsageAny,
- RGBA_8888);
+ texture->Allocate(
+ gfx::Size(30, 30), ResourceProvider::TextureHintImmutable, RGBA_8888);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resource_provider->num_resources());
« no previous file with comments | « cc/resources/scoped_resource.cc ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698