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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc

Issue 806653006: Update GPU memory buffers to use StrideInBytes internally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit Created 5 years, 11 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: content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc b/content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc
index 3ac1b8329cad7ee1a8c61a0d5a9a296149384d95..346b7ff5d9556b58b2e33ac1438abab68f6f35e9 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc
@@ -86,9 +86,9 @@ TEST_P(GpuMemoryBufferImplTest, Map) {
if (configuration.usage != gfx::GpuMemoryBuffer::MAP)
continue;
- size_t width_in_bytes =
- GpuMemoryBufferImpl::BytesPerPixel(configuration.format) *
- buffer_size.width();
+ size_t width_in_bytes = 0;
+ EXPECT_TRUE(GpuMemoryBufferImpl::StrideInBytes(
+ buffer_size.width(), configuration.format, &width_in_bytes));
EXPECT_GT(width_in_bytes, 0u);
scoped_ptr<char[]> data(new char[width_in_bytes]);
memset(data.get(), 0x2a, width_in_bytes);

Powered by Google App Engine
This is Rietveld 408576698