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

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

Issue 1024113003: Add multi-planar functions to GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fix. Created 5 years, 9 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_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 8daff2a9b80c53572bfb969572d0e4b691ca5535..3d3aee965a3d5aaa526538d9b1aff7d6923e1d24 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
@@ -156,10 +156,11 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
return false;
}
-void* GpuMemoryBufferImplSharedMemory::Map() {
+bool GpuMemoryBufferImplSharedMemory::Map(void** data) {
DCHECK(!mapped_);
mapped_ = true;
- return shared_memory_->memory();
+ *data = shared_memory_->memory();
+ return true;
}
void GpuMemoryBufferImplSharedMemory::Unmap() {
@@ -167,11 +168,11 @@ void GpuMemoryBufferImplSharedMemory::Unmap() {
mapped_ = false;
}
-uint32 GpuMemoryBufferImplSharedMemory::GetStride() const {
+void GpuMemoryBufferImplSharedMemory::GetStride(uint32* stride) const {
size_t stride_in_bytes = 0;
bool valid_stride = StrideInBytes(size_.width(), format_, &stride_in_bytes);
DCHECK(valid_stride);
- return stride_in_bytes;
+ *stride = stride_in_bytes;
}
gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSharedMemory::GetHandle() const {

Powered by Google App Engine
This is Rietveld 408576698