| Index: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| index 263fdc34f99d81de24aeefb6773d3f99b0d8eed9..9b463b9ccc4957c0fd7bc92214212fcda99f6a31 100644
|
| --- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| +++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| @@ -161,10 +161,19 @@ GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
|
| }
|
| pixmap = it->second.get();
|
| }
|
| + return CreateImageForPixmap(pixmap, size, format, internalformat);
|
| +}
|
| +
|
| +scoped_refptr<gfx::GLImage>
|
| +GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForPixmap(
|
| + scoped_refptr<NativePixmap> pixmap,
|
| + const gfx::Size& size,
|
| + gfx::GpuMemoryBuffer::Format format,
|
| + unsigned internalformat) {
|
| if (pixmap->GetEGLClientBuffer()) {
|
| scoped_refptr<GLImageOzoneNativePixmap> image =
|
| new GLImageOzoneNativePixmap(size);
|
| - if (!image->Initialize(pixmap)) {
|
| + if (!image->Initialize(pixmap.get())) {
|
| return scoped_refptr<gfx::GLImage>();
|
| }
|
| return image;
|
| @@ -172,7 +181,7 @@ GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
|
| if (pixmap->GetDmaBufFd() > 0) {
|
| scoped_refptr<GLImageOzoneNativePixmapDmaBuf> image =
|
| new GLImageOzoneNativePixmapDmaBuf(size, internalformat);
|
| - if (!image->Initialize(pixmap, format)) {
|
| + if (!image->Initialize(pixmap.get(), format)) {
|
| return scoped_refptr<gfx::GLImage>();
|
| }
|
| return image;
|
|
|