Index: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc |
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc |
index b7f750e7bbff8241e76d6a11b5c35a26c8630185..9a36a3b7d611951a517a426383586848e6181be4 100644 |
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc |
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc |
@@ -23,12 +23,10 @@ |
gfx::BufferFormat format, |
const DestructionCallback& callback, |
scoped_ptr<base::SharedMemory> shared_memory, |
- size_t offset, |
- int stride) |
+ size_t offset) |
: GpuMemoryBufferImpl(id, size, format, callback), |
shared_memory_(shared_memory.Pass()), |
- offset_(offset), |
- stride_(stride) { |
+ offset_(offset) { |
DCHECK(IsSizeValidForFormat(size, format)); |
} |
@@ -50,8 +48,7 @@ |
return nullptr; |
return make_scoped_ptr(new GpuMemoryBufferImplSharedMemory( |
- id, size, format, callback, shared_memory.Pass(), 0, |
- gfx::RowSizeForBufferFormat(size.width(), format, 0))); |
+ id, size, format, callback, shared_memory.Pass(), 0)); |
} |
// static |
@@ -73,7 +70,6 @@ |
handle.type = gfx::SHARED_MEMORY_BUFFER; |
handle.id = id; |
handle.offset = 0; |
- handle.stride = gfx::RowSizeForBufferFormat(size.width(), format, 0); |
shared_memory.GiveToProcess(child_process, &handle.handle); |
return handle; |
} |
@@ -92,7 +88,7 @@ |
return make_scoped_ptr(new GpuMemoryBufferImplSharedMemory( |
handle.id, size, format, callback, |
make_scoped_ptr(new base::SharedMemory(handle.handle, false)), |
- handle.offset, handle.stride)); |
+ handle.offset)); |
} |
// static |
@@ -166,7 +162,6 @@ |
DCHECK(rv); |
handle->type = gfx::SHARED_MEMORY_BUFFER; |
handle->offset = 0; |
- handle->stride = gfx::RowSizeForBufferFormat(size.width(), format, 0); |
handle->handle = base::SharedMemory::DuplicateHandle(shared_memory.handle()); |
return base::Bind(&Noop); |
} |
@@ -177,8 +172,6 @@ |
// Map the buffer first time Map() is called then keep it mapped for the |
// lifetime of the buffer. This avoids mapping the buffer unless necessary. |
if (!shared_memory_->memory()) { |
- DCHECK_EQ(static_cast<size_t>(stride_), |
- gfx::RowSizeForBufferFormat(size_.width(), format_, 0)); |
size_t buffer_size = gfx::BufferSizeForBufferFormat(size_, format_); |
// Note: offset_ != 0 is not common use-case. To keep it simple we |
// map offset + buffer_size here but this can be avoided using MapAt(). |
@@ -212,7 +205,6 @@ |
handle.type = gfx::SHARED_MEMORY_BUFFER; |
handle.id = id_; |
handle.offset = offset_; |
- handle.stride = stride_; |
handle.handle = shared_memory_->handle(); |
return handle; |
} |