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

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

Issue 1024113003: Add multi-planar functions to GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reveman@ comments. 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_io_surface.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc b/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
index e8ac048e15d79994ffba7017424c0f6ee753c5ae..ec3552dbc099685536a5a99028582f0ec0fba772 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
@@ -35,21 +35,23 @@ scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImplIOSurface::CreateFromHandle(
handle.id, size, format, callback, io_surface.release()));
}
-void* GpuMemoryBufferImplIOSurface::Map() {
+bool GpuMemoryBufferImplIOSurface::Map(void** data) {
DCHECK(!mapped_);
IOSurfaceLock(io_surface_, 0, NULL);
mapped_ = true;
- return IOSurfaceGetBaseAddress(io_surface_);
+ *data = IOSurfaceGetBaseAddress(io_surface_);
+ return true;
}
+
reveman 2015/03/24 22:16:53 nit: no need for a new line here
emircan 2015/03/24 22:45:16 Done.
void GpuMemoryBufferImplIOSurface::Unmap() {
DCHECK(mapped_);
IOSurfaceUnlock(io_surface_, 0, NULL);
mapped_ = false;
}
-uint32 GpuMemoryBufferImplIOSurface::GetStride() const {
- return IOSurfaceGetBytesPerRow(io_surface_);
+void GpuMemoryBufferImplIOSurface::GetStride(uint32* stride) const {
+ *stride = IOSurfaceGetBytesPerRow(io_surface_);
}
gfx::GpuMemoryBufferHandle GpuMemoryBufferImplIOSurface::GetHandle() const {

Powered by Google App Engine
This is Rietveld 408576698