Use MojoCompositorFrameSink in RendererCompositorFrameSink
It's essential for MUS that all clients submit frames using Mojo. This CL gets rid of
legacy IPC in RendererCompositorFrameSink and uses Mojo instead.
To this end, I introduced content::mojom::FrameSinkProvider, an interface that takes
the widget id (= legacy IPC routing id) and provides a MojoCompositorFrameSinkPtr to
be used in RendererCompositorFrameSink. The frames go to RenderWidgetHostImpl
and are processed the same way they used to be.
Note: Due to crbug.com/709689, we keep sending BeginFrames using Chrome
IPC.
We have some performance numbers available for smoothness.top_25_smooth at
Patch Set 35. There is no metric that is consistently better than or worse than ToT.
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2774373002
Cr-Commit-Position: refs/heads/master@{#463845}
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 83960ac..b46d2dc 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -32,6 +32,7 @@
#include "content/common/content_export.h"
#include "content/common/frame.mojom.h"
#include "content/common/frame_replication_state.h"
+#include "content/common/frame_sink_provider.mojom.h"
#include "content/common/render_frame_message_filter.mojom.h"
#include "content/common/render_message_filter.mojom.h"
#include "content/common/renderer.mojom.h"
@@ -504,6 +505,10 @@
return needs_to_record_first_active_paint_;
}
+ mojom::FrameSinkProvider* GetFrameSinkProvider() {
+ return frame_sink_provider_.get();
+ }
+
protected:
RenderThreadImpl(
const InProcessChildThreadParams& params,
@@ -786,6 +791,8 @@
variations::ChildProcessFieldTrialSyncer field_trial_syncer_;
+ mojom::FrameSinkProviderPtr frame_sink_provider_;
+
DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
};