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

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

Issue 1055403010: content: Add GpuMemoryBuffer MemoryDumpProvider implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move register out of ifdef Created 5 years, 8 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 0fa6e814c896c45177791ab0a6c4c33cb9cfec77..b1611b38e2ac90f42a95519eb77c00e457451284 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
@@ -82,12 +82,13 @@ bool GpuMemoryBufferImplSurfaceTexture::Map(void** data) {
return false;
}
- size_t stride_in_bytes = 0;
- if (!StrideInBytes(buffer.stride, format_, 0, &stride_in_bytes))
- return false;
-
DCHECK_LE(size_.width(), buffer.stride);
- stride_ = stride_in_bytes;
+ size_t row_size_in_bytes = 0;
+ bool valid_row_size =
+ RowSizeInBytes(buffer.stride, format_, 0, &row_size_in_bytes);
+ DCHECK(valid_row_size);
+
+ stride_ = row_size_in_bytes;
mapped_ = true;
*data = buffer.bits;
return true;

Powered by Google App Engine
This is Rietveld 408576698