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

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

Issue 1137453002: content: Pass IOSurface references using Mach IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 5 years, 7 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 a7141e4fc77eff52db504473ea70d0c81cd4cf30..f74cabdb1413b795dc17f5f67742a5fce1eaeafb 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -183,6 +183,10 @@
#include "ui/gfx/win/dpi.h"
#endif
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+#include "content/browser/browser_io_surface_manager_mac.h"
+#endif
+
#if defined(ENABLE_BROWSER_CDMS)
#include "content/browser/media/cdm/browser_cdm_manager.h"
#endif
@@ -1550,6 +1554,14 @@ void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) {
tracked_objects::ThreadData::Status status =
tracked_objects::ThreadData::status();
Send(new ChildProcessMsg_SetProfilerStatus(status));
+
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ io_surface_manager_mailbox_ =
+ BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessMailbox(
+ GetID());
+ Send(new ChildProcessMsg_SetIOSurfaceManagerMailbox(
+ io_surface_manager_mailbox_));
+#endif
}
void RenderProcessHostImpl::OnChannelError() {
@@ -1667,6 +1679,13 @@ void RenderProcessHostImpl::Cleanup() {
// reused in between now and when the Delete task runs.
UnregisterHost(GetID());
}
+
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ if (!io_surface_manager_mailbox_.IsZero()) {
+ BrowserIOSurfaceManager::GetInstance()->InvalidateChildProcessMailbox(
+ io_surface_manager_mailbox_);
+ }
+#endif
}
void RenderProcessHostImpl::AddPendingView() {

Powered by Google App Engine
This is Rietveld 408576698