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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 external_begin_frame_source_.AddObserver(obs); | 50 external_begin_frame_source_.AddObserver(obs); |
51 } | 51 } |
52 | 52 |
53 void CompositorExternalBeginFrameSource::RemoveObserver( | 53 void CompositorExternalBeginFrameSource::RemoveObserver( |
54 cc::BeginFrameObserver* obs) { | 54 cc::BeginFrameObserver* obs) { |
55 external_begin_frame_source_.RemoveObserver(obs); | 55 external_begin_frame_source_.RemoveObserver(obs); |
56 } | 56 } |
57 | 57 |
58 void CompositorExternalBeginFrameSource::DidFinishFrame( | 58 void CompositorExternalBeginFrameSource::DidFinishFrame( |
59 cc::BeginFrameObserver* obs, | 59 cc::BeginFrameObserver* obs) { |
60 const cc::BeginFrameAck& ack) { | 60 external_begin_frame_source_.DidFinishFrame(obs); |
61 external_begin_frame_source_.DidFinishFrame(obs, ack); | |
62 } | 61 } |
63 | 62 |
64 bool CompositorExternalBeginFrameSource::IsThrottled() const { | 63 bool CompositorExternalBeginFrameSource::IsThrottled() const { |
65 return true; | 64 return true; |
66 } | 65 } |
67 | 66 |
68 void CompositorExternalBeginFrameSource::OnNeedsBeginFrames( | 67 void CompositorExternalBeginFrameSource::OnNeedsBeginFrames( |
69 bool needs_begin_frames) { | 68 bool needs_begin_frames) { |
70 Send(new ViewHostMsg_SetNeedsBeginFrames(routing_id_, needs_begin_frames)); | 69 Send(new ViewHostMsg_SetNeedsBeginFrames(routing_id_, needs_begin_frames)); |
71 } | 70 } |
(...skipping 17 matching lines...) Expand all Loading... |
89 void CompositorExternalBeginFrameSource::OnBeginFrame( | 88 void CompositorExternalBeginFrameSource::OnBeginFrame( |
90 const cc::BeginFrameArgs& args) { | 89 const cc::BeginFrameArgs& args) { |
91 external_begin_frame_source_.OnBeginFrame(args); | 90 external_begin_frame_source_.OnBeginFrame(args); |
92 } | 91 } |
93 | 92 |
94 bool CompositorExternalBeginFrameSource::Send(IPC::Message* message) { | 93 bool CompositorExternalBeginFrameSource::Send(IPC::Message* message) { |
95 return message_sender_->Send(message); | 94 return message_sender_->Send(message); |
96 } | 95 } |
97 | 96 |
98 } // namespace content | 97 } // namespace content |
OLD | NEW |