| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_output_surface.h" | 5 #include "content/renderer/gpu/compositor_output_surface.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 FrameSwapMessageQueue::TransferMessages(&messages, | 114 FrameSwapMessageQueue::TransferMessages(&messages, |
| 115 &messages_to_deliver_with_frame); | 115 &messages_to_deliver_with_frame); |
| 116 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, output_surface_id_, | 116 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, output_surface_id_, |
| 117 *frame, | 117 *frame, |
| 118 messages_to_deliver_with_frame)); | 118 messages_to_deliver_with_frame)); |
| 119 // ~send_message_scope. | 119 // ~send_message_scope. |
| 120 } | 120 } |
| 121 client_->DidSwapBuffers(); | 121 client_->DidSwapBuffers(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void CompositorOutputSurface::BindFramebuffer() { |
| 125 // This is a delegating output surface, no framebuffer/direct drawing support. |
| 126 NOTREACHED(); |
| 127 } |
| 128 |
| 129 uint32_t CompositorOutputSurface::GetFramebufferCopyTextureFormat() { |
| 130 // This is a delegating output surface, no framebuffer/direct drawing support. |
| 131 NOTREACHED(); |
| 132 return 0; |
| 133 } |
| 134 |
| 124 void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { | 135 void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
| 125 DCHECK(client_thread_checker_.CalledOnValidThread()); | 136 DCHECK(client_thread_checker_.CalledOnValidThread()); |
| 126 if (!HasClient()) | 137 if (!HasClient()) |
| 127 return; | 138 return; |
| 128 IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message) | 139 IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message) |
| 129 IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, | 140 IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, |
| 130 OnUpdateVSyncParametersFromBrowser); | 141 OnUpdateVSyncParametersFromBrowser); |
| 131 IPC_MESSAGE_HANDLER(ViewMsg_SwapCompositorFrameAck, OnSwapAck); | 142 IPC_MESSAGE_HANDLER(ViewMsg_SwapCompositorFrameAck, OnSwapAck); |
| 132 IPC_MESSAGE_HANDLER(ViewMsg_ReclaimCompositorResources, OnReclaimResources); | 143 IPC_MESSAGE_HANDLER(ViewMsg_ReclaimCompositorResources, OnReclaimResources); |
| 133 IPC_END_MESSAGE_MAP() | 144 IPC_END_MESSAGE_MAP() |
| (...skipping 28 matching lines...) Expand all Loading... |
| 162 if (output_surface_id != output_surface_id_) | 173 if (output_surface_id != output_surface_id_) |
| 163 return; | 174 return; |
| 164 ReclaimResources(&ack); | 175 ReclaimResources(&ack); |
| 165 } | 176 } |
| 166 | 177 |
| 167 bool CompositorOutputSurface::Send(IPC::Message* message) { | 178 bool CompositorOutputSurface::Send(IPC::Message* message) { |
| 168 return message_sender_->Send(message); | 179 return message_sender_->Send(message); |
| 169 } | 180 } |
| 170 | 181 |
| 171 } // namespace content | 182 } // namespace content |
| OLD | NEW |