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

Unified Diff: content/browser/android/synchronous_compositor_host.cc

Issue 2383933002: Added message filter receiving frames from compositor
Patch Set: Created 4 years, 3 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/android/synchronous_compositor_host.cc
diff --git a/content/browser/android/synchronous_compositor_host.cc b/content/browser/android/synchronous_compositor_host.cc
index 19127cf328a34587f6cf2a0583b9ec8fb16c9ea5..3f7844e92ff30ecf4f325000b427946b21d7e6b9 100644
--- a/content/browser/android/synchronous_compositor_host.cc
+++ b/content/browser/android/synchronous_compositor_host.cc
@@ -91,21 +91,27 @@ bool SynchronousCompositorHost::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(SyncCompositorHostMsg_CompositorFrameSinkCreated,
CompositorFrameSinkCreated)
IPC_MESSAGE_HANDLER(SyncCompositorHostMsg_UpdateState, ProcessCommonParams)
- IPC_MESSAGE_HANDLER_GENERIC(SyncCompositorHostMsg_ReturnFrame,
- DemandDrawHwReceiveFrame(message))
+ // IPC_MESSAGE_HANDLER_GENERIC(SyncCompositorHostMsg_ReturnFrame,
+ // DemandDrawHwReceiveFrame(message))
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
-void SynchronousCompositorHost::DemandDrawHwAsync(
+scoped_refptr<SynchronousCompositor::FrameFuture>
+SynchronousCompositorHost::DemandDrawHwAsync(
const gfx::Size& viewport_size,
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority) {
SyncCompositorDemandDrawHwParams params(viewport_size,
viewport_rect_for_tile_priority,
transform_for_tile_priority);
+ scoped_refptr<SynchronousCompositor::FrameFuture> frame_future =
+ new FrameFuture();
+ rwhva_->GetRenderWidgetHost()->GetProcess()->GetFilter()->SetFrameFuture(
+ routing_id_, frame_future);
sender_->Send(new SyncCompositorMsg_DemandDrawHwAsync(routing_id_, params));
+ return frame_future;
}
SynchronousCompositor::Frame SynchronousCompositorHost::DemandDrawHw(
« no previous file with comments | « content/browser/android/synchronous_compositor_host.h ('k') | content/browser/android/synchronous_compositor_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698