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

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: 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..8df55a3f53610f4d75ed4fefd10dd33d97165dcf 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
@@ -42,6 +42,12 @@ void* GpuMemoryBufferImplIOSurface::Map() {
return IOSurfaceGetBaseAddress(io_surface_);
}
+void* GpuMemoryBufferImplIOSurface::Map(size_t plane_index) {
+ if (plane_index >= num_planes_)
+ return NULL;
+ return Map();
+}
+
void GpuMemoryBufferImplIOSurface::Unmap() {
DCHECK(mapped_);
IOSurfaceUnlock(io_surface_, 0, NULL);
@@ -52,6 +58,12 @@ uint32 GpuMemoryBufferImplIOSurface::GetStride() const {
return IOSurfaceGetBytesPerRow(io_surface_);
}
+uint32 GpuMemoryBufferImplIOSurface::GetStride(size_t plane_index) const {
+ if (plane_index >= num_planes_)
+ return 0;
+ return GetStride();
+}
+
gfx::GpuMemoryBufferHandle GpuMemoryBufferImplIOSurface::GetHandle() const {
gfx::GpuMemoryBufferHandle handle;
handle.type = gfx::IO_SURFACE_BUFFER;

Powered by Google App Engine
This is Rietveld 408576698