| 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 8d6d8142f625618a42b86d447ecd843bb6ef4159..38667e51e180f2d306fc50ec87e8994da9d88e1f 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
|
| @@ -17,6 +17,11 @@ class GLImageOzoneNativePixmap : public gfx::GLImageEGL {
|
| public:
|
| explicit GLImageOzoneNativePixmap(const gfx::Size& size) : GLImageEGL(size) {}
|
|
|
| + void Destroy(bool have_context) override {
|
| + gfx::GLImageEGL::Destroy(have_context);
|
| + pixmap_ = nullptr;
|
| + }
|
| +
|
| bool Initialize(NativePixmap* pixmap) {
|
| EGLint attrs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE};
|
| if (!Initialize(EGL_NATIVE_PIXMAP_KHR, pixmap->GetEGLClientBuffer(), attrs))
|
| @@ -48,6 +53,11 @@ class GLImageOzoneNativePixmapDmaBuf : public gfx::GLImageLinuxDMABuffer {
|
| unsigned internalformat)
|
| : GLImageLinuxDMABuffer(size, internalformat) {}
|
|
|
| + void Destroy(bool have_context) override {
|
| + gfx::GLImageLinuxDMABuffer::Destroy(have_context);
|
| + pixmap_ = nullptr;
|
| + }
|
| +
|
| bool Initialize(NativePixmap* pixmap, gfx::GpuMemoryBuffer::Format format) {
|
| base::FileDescriptor handle(pixmap->GetDmaBufFd(), false);
|
| if (!GLImageLinuxDMABuffer::Initialize(handle, format,
|
|
|