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 6fa1ccfa172f8f5c6baa2286fb2983d0301bf41a..cdf4ce607ae0954074fd3c3255db333972e90f29 100644 |
--- a/content/browser/renderer_host/render_message_filter.cc |
+++ b/content/browser/renderer_host/render_message_filter.cc |
@@ -20,6 +20,7 @@ |
#include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
#include "content/browser/dom_storage/session_storage_namespace_impl.h" |
#include "content/browser/download/download_stats.h" |
+#include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
#include "content/browser/gpu/gpu_data_manager_impl.h" |
#include "content/browser/loader/resource_dispatcher_host_impl.h" |
#include "content/browser/media/media_internals.h" |
@@ -1311,14 +1312,29 @@ void RenderMessageFilter::OnAllocateGpuMemoryBuffer(uint32 width, |
if (surface_texture_id != -1) { |
gfx::GpuMemoryBufferHandle handle; |
handle.type = gfx::SURFACE_TEXTURE_BUFFER; |
- handle.surface_texture_id = |
- gfx::SurfaceTextureId(surface_texture_id, render_process_id_); |
+ handle.gpu_memory_id = |
+ gfx::GpuMemoryBufferId(surface_texture_id, PeerHandle()); |
GpuMemoryBufferAllocated(reply, handle); |
return; |
} |
} |
#endif |
+#if 1 |
+ |
+ BrowserGpuChannelHostFactory* factory = |
+ BrowserGpuChannelHostFactory::instance(); |
+ factory->CreateGpuMemoryBuffer( |
+ width, |
+ height, |
+ internalformat, |
+ usage, |
+ gfx::GpuMemoryBufferHandle(), |
+ base::Bind(&RenderMessageFilter::GpuMemoryBufferAllocated, this, reply)); |
+ |
+ return; |
+#endif |
+ |
GpuMemoryBufferImpl::AllocateForChildProcess( |
gfx::Size(width, height), |
internalformat, |