Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(987)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 211133005: [WIP] Not for review. Zero copy. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 11a629d413a2d457870f0914fce9372962cf5201..f3cfc1290e407f1b7b07d2efbad5eab84f736f4d 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -178,6 +178,11 @@
#include "content/common/media/media_stream_messages.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
+
extern bool g_exited_main_message_loop;
static const char* kSiteProcessMapKeyName = "content_site_process_map";
@@ -2288,6 +2293,23 @@ void RenderProcessHostImpl::OnAllocateGpuMemoryBuffer(uint32 width,
}
#endif
+#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 (GpuMemoryBufferImplIntelDRM::IsFormatSupported(internalformat)) {
+ gfx::GpuMemoryBufferHandle handle;
+ if (GpuMemoryBufferImplIntelDRM::AllocateBufferObject(
+ gfx::Size(width, height), internalformat, &handle.handle)) {
+ handle.type = gfx::INTEL_DRM_BUFFER;
+ GpuMemoryBufferAllocated(reply, handle);
+ return;
+ }
+ }
+#endif
+
GpuMemoryBufferImpl::AllocateForChildProcess(
gfx::Size(width, height),
internalformat,
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698