| Index: content/common/gpu/media/vaapi_drm_picture.cc
|
| diff --git a/content/common/gpu/media/vaapi_drm_picture.cc b/content/common/gpu/media/vaapi_drm_picture.cc
|
| index 1a09b6f23ac151535ac2bf75002e76ff003c0d22..941bc113af68f50c2a7d5b08b84618927f232ae4 100644
|
| --- a/content/common/gpu/media/vaapi_drm_picture.cc
|
| +++ b/content/common/gpu/media/vaapi_drm_picture.cc
|
| @@ -102,17 +102,14 @@ bool VaapiDrmPicture::Initialize() {
|
| if (!make_context_current_.Run())
|
| return false;
|
|
|
| - // Create an EGLImage out of the same buffer.
|
| - gl_image_ = new gfx::GLImageLinuxDMABuffer(size(), GL_RGBA);
|
| - if (!gl_image_->Initialize(base::FileDescriptor(dmabuf_fd, false),
|
| - gfx::GpuMemoryBuffer::BGRA_8888, dmabuf_pitch)) {
|
| - LOG(ERROR) << "Failed to create a GLImageLinuxDMABuffer for a NativePixmap";
|
| - return false;
|
| - }
|
| -
|
| - // Bind the EGLImage to the given GL texture.
|
| gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_EXTERNAL_OES,
|
| texture_id());
|
| + gl_image_ = ui::GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForPixmap(
|
| + pixmap_, size(), gfx::GpuMemoryBuffer::BGRA_8888, GL_RGBA);
|
| + if (!gl_image_) {
|
| + LOG(ERROR) << "Failed to create GLImage";
|
| + return false;
|
| + }
|
| if (!gl_image_->BindTexImage(GL_TEXTURE_EXTERNAL_OES)) {
|
| LOG(ERROR) << "Failed to bind texture to GLImage";
|
| return false;
|
|
|