OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/gpu/compositor_external_begin_frame_source.h" | 5 #include "content/renderer/gpu/compositor_external_begin_frame_source.h" |
6 | 6 |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "ipc/ipc_sync_channel.h" | 8 #include "ipc/ipc_sync_channel.h" |
9 #include "ipc/ipc_sync_message_filter.h" | 9 #include "ipc/ipc_sync_message_filter.h" |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 bool CompositorExternalBeginFrameSource::IsThrottled() const { | 58 bool CompositorExternalBeginFrameSource::IsThrottled() const { |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 void CompositorExternalBeginFrameSource::OnNeedsBeginFrames( | 62 void CompositorExternalBeginFrameSource::OnNeedsBeginFrames( |
63 bool needs_begin_frames) { | 63 bool needs_begin_frames) { |
64 Send(new ViewHostMsg_SetNeedsBeginFrames(routing_id_, needs_begin_frames)); | 64 Send(new ViewHostMsg_SetNeedsBeginFrames(routing_id_, needs_begin_frames)); |
65 } | 65 } |
66 | 66 |
| 67 void CompositorExternalBeginFrameSource::OnDidFinishFrame( |
| 68 const cc::BeginFrameAck& ack) { |
| 69 // TODO(eseckler): Pass on the ack to the view host. |
| 70 } |
| 71 |
67 void CompositorExternalBeginFrameSource::OnMessageReceived( | 72 void CompositorExternalBeginFrameSource::OnMessageReceived( |
68 const IPC::Message& message) { | 73 const IPC::Message& message) { |
69 DCHECK(CalledOnValidThread()); | 74 DCHECK(CalledOnValidThread()); |
70 DCHECK(begin_frame_source_proxy_); | 75 DCHECK(begin_frame_source_proxy_); |
71 IPC_BEGIN_MESSAGE_MAP(CompositorExternalBeginFrameSource, message) | 76 IPC_BEGIN_MESSAGE_MAP(CompositorExternalBeginFrameSource, message) |
72 IPC_MESSAGE_HANDLER(ViewMsg_SetBeginFramePaused, | 77 IPC_MESSAGE_HANDLER(ViewMsg_SetBeginFramePaused, |
73 OnSetBeginFrameSourcePaused) | 78 OnSetBeginFrameSourcePaused) |
74 IPC_MESSAGE_HANDLER(ViewMsg_BeginFrame, OnBeginFrame) | 79 IPC_MESSAGE_HANDLER(ViewMsg_BeginFrame, OnBeginFrame) |
75 IPC_END_MESSAGE_MAP() | 80 IPC_END_MESSAGE_MAP() |
76 } | 81 } |
77 | 82 |
78 void CompositorExternalBeginFrameSource::OnSetBeginFrameSourcePaused( | 83 void CompositorExternalBeginFrameSource::OnSetBeginFrameSourcePaused( |
79 bool paused) { | 84 bool paused) { |
80 external_begin_frame_source_.OnSetBeginFrameSourcePaused(paused); | 85 external_begin_frame_source_.OnSetBeginFrameSourcePaused(paused); |
81 } | 86 } |
82 | 87 |
83 void CompositorExternalBeginFrameSource::OnBeginFrame( | 88 void CompositorExternalBeginFrameSource::OnBeginFrame( |
84 const cc::BeginFrameArgs& args) { | 89 const cc::BeginFrameArgs& args) { |
85 external_begin_frame_source_.OnBeginFrame(args); | 90 external_begin_frame_source_.OnBeginFrame(args); |
86 } | 91 } |
87 | 92 |
88 bool CompositorExternalBeginFrameSource::Send(IPC::Message* message) { | 93 bool CompositorExternalBeginFrameSource::Send(IPC::Message* message) { |
89 return message_sender_->Send(message); | 94 return message_sender_->Send(message); |
90 } | 95 } |
91 | 96 |
92 } // namespace content | 97 } // namespace content |
OLD | NEW |