Chromium Code Reviews| 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..3f9e8385f73e04964239d7e81a853e4b007e999d 100644 |
| --- a/content/renderer/gpu/compositor_output_surface.cc |
| +++ b/content/renderer/gpu/compositor_output_surface.cc |
| @@ -42,6 +42,7 @@ IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter( |
| { |
| uint32 messages_to_filter[] = { |
| ViewMsg_UpdateVSyncParameters::ID, |
| + ViewMsg_DidVSync::ID, |
| ViewMsg_SwapCompositorFrameAck::ID |
| }; |
| @@ -130,6 +131,7 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
| return; |
| IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message) |
| IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, OnUpdateVSyncParameters); |
| + IPC_MESSAGE_HANDLER(ViewMsg_DidVSync, DidVSync); |
|
jam
2013/04/16 16:40:34
nit: follow conventions of message handlers always
Sami
2013/04/16 17:13:05
Done.
|
| IPC_MESSAGE_HANDLER(ViewMsg_SwapCompositorFrameAck, OnSwapAck); |
| IPC_END_MESSAGE_MAP() |
| } |
| @@ -137,10 +139,19 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
| void CompositorOutputSurface::OnUpdateVSyncParameters( |
| base::TimeTicks timebase, base::TimeDelta interval) { |
| DCHECK(CalledOnValidThread()); |
| - DCHECK(client_); |
| client_->OnVSyncParametersChanged(timebase, interval); |
| } |
| +void CompositorOutputSurface::EnableVSyncNotification(bool enable) { |
|
jam
2013/04/16 16:40:34
can we ifdef these methods for android to make it
Sami
2013/04/16 17:13:05
Sure, I've added ifdefs here too.
|
| + DCHECK(CalledOnValidThread()); |
| + Send(new ViewHostMsg_SetVSyncNotificationEnabled(routing_id_, enable)); |
| +} |
| + |
| +void CompositorOutputSurface::DidVSync(base::TimeTicks frame_time) { |
| + DCHECK(CalledOnValidThread()); |
| + client_->DidVSync(frame_time); |
| +} |
| + |
| void CompositorOutputSurface::OnSwapAck(const cc::CompositorFrameAck& ack) { |
| client_->OnSendFrameToParentCompositorAck(ack); |
| } |