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

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

Issue 2458743002: Switching to base::Optional<CompositorFrame> in Android's synchronous compositor IPC messages (Closed)
Patch Set: Using base::Optional instead of boolean Created 4 years, 2 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 fde29a64d26f869494af4d179e51faac6fe63d26..761ce27b86e60e46fd32769fad55b0024500fd28 100644
--- a/content/renderer/android/synchronous_compositor_proxy.cc
+++ b/content/renderer/android/synchronous_compositor_proxy.cc
@@ -188,9 +188,10 @@ void SynchronousCompositorProxy::DoDemandDrawHw(
if (inside_receive_) {
// Did not swap.
if (!reply_message) {
- SendDemandDrawHwReplyAsync(cc::CompositorFrame(), 0u);
+ SendDemandDrawHwReplyAsync(base::Optional<cc::CompositorFrame>(), 0u);
boliu 2016/10/27 19:52:16 would nullptr work here?
} else {
- SendDemandDrawHwReply(cc::CompositorFrame(), 0u, reply_message);
+ SendDemandDrawHwReply(base::Optional<cc::CompositorFrame>(), 0u,
+ reply_message);
}
inside_receive_ = false;
}
@@ -216,14 +217,14 @@ void SynchronousCompositorProxy::SubmitCompositorFrameHw(
}
void SynchronousCompositorProxy::SendDemandDrawHwReplyAsync(
- cc::CompositorFrame frame,
+ base::Optional<cc::CompositorFrame> frame,
uint32_t compositor_frame_sink_id) {
Send(new SyncCompositorHostMsg_ReturnFrame(routing_id_,
compositor_frame_sink_id, frame));
}
void SynchronousCompositorProxy::SendDemandDrawHwReply(
- cc::CompositorFrame frame,
+ base::Optional<cc::CompositorFrame> frame,
uint32_t compositor_frame_sink_id,
IPC::Message* reply_message) {
SyncCompositorCommonRendererParams common_renderer_params;

Powered by Google App Engine
This is Rietveld 408576698