| Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| index 55d59dfc4fcc5663d5983ac6773568badd883ea6..23bf0783e8fbab873e1b73491a10d6d5c9768580 100644
|
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| @@ -18,6 +18,10 @@
|
| #include "content/public/common/content_client.h"
|
| #include "ipc/ipc_forwarding_message_filter.h"
|
|
|
| +#if defined(OS_LINUX)
|
| +#include "content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.h"
|
| +#endif
|
| +
|
| namespace content {
|
|
|
| BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL;
|
| @@ -382,6 +386,21 @@ scoped_ptr<gfx::GpuMemoryBuffer>
|
| if (!GpuMemoryBufferImpl::IsFormatValid(internalformat))
|
| return scoped_ptr<gfx::GpuMemoryBuffer>();
|
|
|
| +#if defined(OS_LINUX)
|
| + if (GpuMemoryBufferImplIntelDRM::IsFormatSupported(internalformat)) {
|
| + drm_intel_bo* buffer_object =
|
| + GpuMemoryBufferImplIntelDRM::CreateBufferObject(
|
| + gfx::Size(width, height), internalformat);
|
| + if (buffer_object) {
|
| + scoped_ptr<GpuMemoryBufferImplIntelDRM> buffer(
|
| + new GpuMemoryBufferImplIntelDRM(gfx::Size(width, height),
|
| + internalformat));
|
| + if (buffer->InitializeFromBufferObject(buffer_object))
|
| + return buffer.PassAs<gfx::GpuMemoryBuffer>();
|
| + }
|
| + }
|
| +#endif
|
| +
|
| size_t size = width * height *
|
| GpuMemoryBufferImpl::BytesPerPixel(internalformat);
|
| scoped_ptr<base::SharedMemory> shm(new base::SharedMemory());
|
|
|