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

Unified Diff: cc/resources/scoped_resource_unittest.cc

Issue 1202843008: cc: Fix BytesPerPixel issue and refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RowSize=>Width. Created 5 years, 6 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
Index: cc/resources/scoped_resource_unittest.cc
diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc
index 197fa1f3b8d9e96687f9d84262b7c7265423da2f..50fac9eabb060bba0aae444c0108174bd0ee746a 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -31,8 +31,7 @@ TEST(ScopedResourceTest, NewScopedResource) {
// New scoped textures do not have a size yet.
EXPECT_EQ(gfx::Size(), texture->size());
- EXPECT_EQ(0u, Resource::UncheckedMemorySizeBytes(texture->size(),
- texture->format()));
+ EXPECT_EQ(0u, ResourceUtil::SizeInBytes(texture->size(), texture->format()));
}
TEST(ScopedResourceTest, CreateScopedResource) {
@@ -51,8 +50,8 @@ TEST(ScopedResourceTest, CreateScopedResource) {
// The texture has an allocated byte-size now.
size_t expected_bytes = 30 * 30 * 4;
- EXPECT_EQ(expected_bytes, Resource::UncheckedMemorySizeBytes(
- texture->size(), texture->format()));
+ EXPECT_EQ(expected_bytes,
+ ResourceUtil::SizeInBytes(texture->size(), texture->format()));
EXPECT_LT(0u, texture->id());
EXPECT_EQ(static_cast<unsigned>(RGBA_8888), texture->format());

Powered by Google App Engine
This is Rietveld 408576698