| Index: content/browser/renderer_host/render_message_filter.cc
|
| diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
|
| index e5492e1cd8c24e976abff15c8b0b3b187b53f47d..5d9cd920954ba2f18f18503f14d6f67cd1d577a2 100644
|
| --- a/content/browser/renderer_host/render_message_filter.cc
|
| +++ b/content/browser/renderer_host/render_message_filter.cc
|
| @@ -91,6 +91,10 @@
|
| #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h"
|
| #include "media/base/android/webaudio_media_codec_bridge.h"
|
| #endif
|
| +#if defined(OS_LINUX)
|
| +#include "content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.h"
|
| +#include "ui/gl/gl_implementation.h"
|
| +#endif
|
|
|
| using net::CookieStore;
|
|
|
| @@ -1260,6 +1264,23 @@ void RenderMessageFilter::OnAllocateGpuMemoryBuffer(
|
| return;
|
| }
|
|
|
| +#if defined(OS_LINUX)
|
| + // Intel DRM implementation of gpu memory buffer is limited to EGLGLES2 as we
|
| + // currently depend on EGL_EXT_image_dma_buf_import to use this type of buffer
|
| + // on the GPU side.
|
| + bool is_gl_implementation_supported_by_intel_drm =
|
| + gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2;
|
| +
|
| + if (is_gl_implementation_supported_by_intel_drm &&
|
| + GpuMemoryBufferImplIntelDRM::IsFormatSupported(internalformat)) {
|
| + if (GpuMemoryBufferImplIntelDRM::AllocateBufferObject(
|
| + gfx::Size(width, height), internalformat, &handle->handle)) {
|
| + handle->type = gfx::INTEL_DRM_BUFFER;
|
| + return;
|
| + }
|
| + }
|
| +#endif
|
| +
|
| #if defined(OS_MACOSX)
|
| if (GpuMemoryBufferImplIOSurface::IsFormatSupported(internalformat)) {
|
| IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
|
|
|