| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/render_process_host_impl.cc (revision 277402)
|
| +++ content/browser/renderer_host/render_process_host_impl.cc (working copy)
|
| @@ -177,6 +177,10 @@
|
| #include "content/common/media/media_stream_messages.h"
|
| #endif
|
|
|
| +#if defined(OS_LINUX)
|
| +#include "content/browser/gpu/dri_buffer_manager.h"
|
| +#endif
|
| +
|
| extern bool g_exited_main_message_loop;
|
|
|
| static const char* kSiteProcessMapKeyName = "content_site_process_map";
|
| @@ -2287,6 +2291,26 @@
|
| }
|
| #endif
|
|
|
| +#if defined(OS_LINUX)
|
| + gfx::GpuMemoryBufferHandle handle;
|
| +
|
| + uint64 stride = static_cast<uint64>(width) *
|
| + GpuMemoryBufferImpl::BytesPerPixel(internalformat);
|
| + if (stride > std::numeric_limits<uint32>::max()) {
|
| + handle.type = gfx::EMPTY_BUFFER;
|
| + GpuMemoryBufferAllocated(reply, handle);
|
| + return;
|
| + }
|
| + //if (!buffer_manager_)
|
| + //buffer_manager_ = new DRIBufferManager();
|
| + handle.type = gfx::DMA_BUFFER;
|
| + DRIBufferManager::CreateBuffer(width, height, handle);
|
| + if (handle.handle.fd > 0 && handle.card_handle.fd > 0) {
|
| + GpuMemoryBufferAllocated(reply, handle);
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| GpuMemoryBufferImpl::AllocateForChildProcess(
|
| gfx::Size(width, height),
|
| internalformat,
|
|
|