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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 17859002: Allow WebExternalTextureLayers to receive a bitmap along with a mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 76b40409cb00d860b1f36b8d0031f21435336be1..8c6c8b0bef44e6b368df355e9ebb80a0592917bb 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -106,6 +106,7 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/child/worker_task_runner.h"
#include "webkit/renderer/appcache/appcache_frontend_impl.h"
+#include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h"
#if defined(OS_WIN)
#include <windows.h>
@@ -217,6 +218,10 @@ void AddHistogramSample(void* hist, int sample) {
histogram->Add(sample);
}
+scoped_ptr<base::SharedMemory> AllocateSharedMemoryFunction(size_t size) {
+ return RenderThreadImpl::Get()->HostAllocateSharedMemoryBuffer(size);
+}
+
} // namespace
class RenderThreadImpl::GpuVDAContextLostCallback
@@ -728,6 +733,8 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden())
ScheduleIdleHandler(kLongIdleHandlerDelayMs);
+
+ webkit::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction);
}
void RenderThreadImpl::RegisterSchemes() {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698