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

Unified Diff: content/renderer/android/synchronous_compositor_proxy.cc

Issue 2174203002: OnDrawHardware() implementation with async messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/renderer/android/synchronous_compositor_proxy.cc
diff --git a/content/renderer/android/synchronous_compositor_proxy.cc b/content/renderer/android/synchronous_compositor_proxy.cc
index 6b9883b5a21ed3f138cd8262698a8cc667603b2c..909369bb0c6802e3b92cd559c5096000debbf6f4 100644
--- a/content/renderer/android/synchronous_compositor_proxy.cc
+++ b/content/renderer/android/synchronous_compositor_proxy.cc
@@ -135,8 +135,10 @@ void SynchronousCompositorProxy::OnMessageReceived(
IPC_MESSAGE_HANDLER(SyncCompositorMsg_SynchronizeRendererState,
PopulateCommonParams)
IPC_MESSAGE_HANDLER(SyncCompositorMsg_ComputeScroll, OnComputeScroll)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawHw,
- DemandDrawHw)
+ // IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawHw,
+ // DemandDrawHw)
+ IPC_MESSAGE_HANDLER(CompositorMsg_DemandDrawHw, DemandDrawhw)
+
IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetSharedMemory, SetSharedMemory)
IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZeroSharedMemory, ZeroSharedMemory)
IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawSw,
@@ -169,7 +171,13 @@ void SynchronousCompositorProxy::DemandDrawHw(
if (inside_receive_) {
// Did not swap.
- SendDemandDrawHwReply(cc::CompositorFrame(), 0u, reply_message);
+ //
+ /* Instead of sending the sync reply, send an async message. */
+ // SendDemandDrawHwReply(cc::CompositorFrame(), 1u, reply_message);
+ SyncCompositorCommonRendererParams params;
boliu 2016/07/24 17:33:54 this change should be done in SendDemandDrawHwRepl
ojars 2016/07/28 22:53:55 Done.
+ PolutateCommonParams(&params);
+ Send(new CompositorHostMessage_Frame(routing_id, params, output_surface_id,
+ frame));
inside_receive_ = false;
}
}

Powered by Google App Engine
This is Rietveld 408576698