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

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

Issue 225023009: Add Intel DRM backed GpuMemoryBuffer implementation. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix GpuChannelHost::ShareGpuMemoryBufferToGpuProcess Created 6 years, 8 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_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..dfe6f9a5ac4f165820bd5e8fe5671b911003e52b 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -91,6 +91,9 @@
#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"
+#endif
using net::CookieStore;
@@ -1321,6 +1324,16 @@ void RenderMessageFilter::OnAllocateGpuMemoryBuffer(
}
#endif
+#if defined(OS_LINUX)
+ if (GpuMemoryBufferImplIntelDRM::IsFormatSupported(internalformat)) {
+ if (GpuMemoryBufferImplIntelDRM::AllocateBufferObject(
+ gfx::Size(width, height), internalformat, &handle->handle)) {
+ handle->type = gfx::INTEL_DRM_BUFFER;
+ return;
+ }
+ }
+#endif
+
uint64 stride = static_cast<uint64>(width) *
GpuMemoryBufferImpl::BytesPerPixel(internalformat);
if (stride > std::numeric_limits<uint32>::max()) {

Powered by Google App Engine
This is Rietveld 408576698