diff options
Diffstat (limited to 'content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc')
-rw-r--r-- | content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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 9db3696..d869ef0 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 @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/numerics/safe_math.h" +#include "ui/gfx/buffer_format_util.h" #include "ui/gl/gl_bindings.h" namespace content { @@ -149,7 +150,7 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat( case gfx::BufferFormat::RGBX_8888: return true; case gfx::BufferFormat::YUV_420: { - size_t num_planes = NumberOfPlanesForGpuMemoryBufferFormat(format); + size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format); for (size_t i = 0; i < num_planes; ++i) { size_t factor = SubsamplingFactor(format, i); if (size.width() % factor || size.height() % factor) @@ -166,7 +167,7 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat( bool GpuMemoryBufferImplSharedMemory::Map(void** data) { DCHECK(!mapped_); size_t offset = 0; - size_t num_planes = NumberOfPlanesForGpuMemoryBufferFormat(format_); + size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format_); for (size_t i = 0; i < num_planes; ++i) { data[i] = reinterpret_cast<uint8*>(shared_memory_->memory()) + offset; size_t row_size_in_bytes = 0; @@ -186,7 +187,7 @@ void GpuMemoryBufferImplSharedMemory::Unmap() { } void GpuMemoryBufferImplSharedMemory::GetStride(int* stride) const { - size_t num_planes = NumberOfPlanesForGpuMemoryBufferFormat(format_); + size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format_); for (size_t i = 0; i < num_planes; ++i) { size_t row_size_in_bytes = 0; bool valid_row_size = |