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

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

Issue 852283003: Revert of Update GPU memory buffers to use StrideInBytes internally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_surface_texture.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc b/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc
index c6c47289e7d72ba40559ca6fb5c50105251965dd..401d37a39cd082097e0b84abc818e8dd54608c7c 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc
@@ -75,12 +75,8 @@
return NULL;
}
- size_t stride_in_bytes = 0;
- if (!StrideInBytes(buffer.stride, format_, &stride_in_bytes))
- return NULL;
-
DCHECK_LE(size_.width(), buffer.stride);
- stride_ = stride_in_bytes;
+ stride_ = buffer.stride * BytesPerPixel(format_);
mapped_ = true;
return buffer.bits;
}

Powered by Google App Engine
This is Rietveld 408576698