Index: content/renderer/gpu/compositor_output_surface.cc |
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc |
index 8c981435535a4f699d5e730df65c7b56bef4b67d..aefed7d4270cc07fdc9d472abc28662e3a08e89e 100644 |
--- a/content/renderer/gpu/compositor_output_surface.cc |
+++ b/content/renderer/gpu/compositor_output_surface.cc |
@@ -42,6 +42,9 @@ IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter( |
{ |
uint32 messages_to_filter[] = { |
ViewMsg_UpdateVSyncParameters::ID, |
+#if defined(OS_ANDROID) |
+ ViewMsg_DidVSync::ID, |
+#endif |
ViewMsg_SwapCompositorFrameAck::ID |
}; |
@@ -130,6 +133,9 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
return; |
IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message) |
IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, OnUpdateVSyncParameters); |
+#if defined(OS_ANDROID) |
jam
2013/04/16 22:55:50
nit: convention is to put ifdef section at end of
|
+ IPC_MESSAGE_HANDLER(ViewMsg_DidVSync, OnDidVSync); |
+#endif |
IPC_MESSAGE_HANDLER(ViewMsg_SwapCompositorFrameAck, OnSwapAck); |
IPC_END_MESSAGE_MAP() |
} |
@@ -137,10 +143,21 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
void CompositorOutputSurface::OnUpdateVSyncParameters( |
base::TimeTicks timebase, base::TimeDelta interval) { |
DCHECK(CalledOnValidThread()); |
- DCHECK(client_); |
client_->OnVSyncParametersChanged(timebase, interval); |
} |
+#if defined(OS_ANDROID) |
+void CompositorOutputSurface::EnableVSyncNotification(bool enable) { |
+ DCHECK(CalledOnValidThread()); |
+ Send(new ViewHostMsg_SetVSyncNotificationEnabled(routing_id_, enable)); |
+} |
+ |
+void CompositorOutputSurface::OnDidVSync(base::TimeTicks frame_time) { |
+ DCHECK(CalledOnValidThread()); |
+ client_->DidVSync(frame_time); |
+} |
+#endif // defined(OS_ANDROID) |
+ |
void CompositorOutputSurface::OnSwapAck(const cc::CompositorFrameAck& ack) { |
client_->OnSendFrameToParentCompositorAck(ack); |
} |