| 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..10bbd1f7507f45c1f645793f71a8376ce399bef1 100644
|
| --- a/content/renderer/gpu/compositor_output_surface.cc
|
| +++ b/content/renderer/gpu/compositor_output_surface.cc
|
| @@ -42,7 +42,10 @@ IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter(
|
| {
|
| uint32 messages_to_filter[] = {
|
| ViewMsg_UpdateVSyncParameters::ID,
|
| - ViewMsg_SwapCompositorFrameAck::ID
|
| + ViewMsg_SwapCompositorFrameAck::ID,
|
| +#if defined(OS_ANDROID)
|
| + ViewMsg_DidVSync::ID
|
| +#endif
|
| };
|
|
|
| return new IPC::ForwardingMessageFilter(
|
| @@ -131,16 +134,30 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
|
| IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message)
|
| IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, OnUpdateVSyncParameters);
|
| IPC_MESSAGE_HANDLER(ViewMsg_SwapCompositorFrameAck, OnSwapAck);
|
| +#if defined(OS_ANDROID)
|
| + IPC_MESSAGE_HANDLER(ViewMsg_DidVSync, OnDidVSync);
|
| +#endif
|
| IPC_END_MESSAGE_MAP()
|
| }
|
|
|
| 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);
|
| }
|
|
|