| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 std::vector<std::unique_ptr<IPC::Message>> messages; | 111 std::vector<std::unique_ptr<IPC::Message>> messages; |
| 112 std::vector<IPC::Message> messages_to_deliver_with_frame; | 112 std::vector<IPC::Message> messages_to_deliver_with_frame; |
| 113 frame_swap_message_queue_->DrainMessages(&messages); | 113 frame_swap_message_queue_->DrainMessages(&messages); |
| 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(); | |
| 122 } | 121 } |
| 123 | 122 |
| 124 void CompositorOutputSurface::BindFramebuffer() { | 123 void CompositorOutputSurface::BindFramebuffer() { |
| 125 // This is a delegating output surface, no framebuffer/direct drawing support. | 124 // This is a delegating output surface, no framebuffer/direct drawing support. |
| 126 NOTREACHED(); | 125 NOTREACHED(); |
| 127 } | 126 } |
| 128 | 127 |
| 129 uint32_t CompositorOutputSurface::GetFramebufferCopyTextureFormat() { | 128 uint32_t CompositorOutputSurface::GetFramebufferCopyTextureFormat() { |
| 130 // This is a delegating output surface, no framebuffer/direct drawing support. | 129 // This is a delegating output surface, no framebuffer/direct drawing support. |
| 131 NOTREACHED(); | 130 NOTREACHED(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (output_surface_id != output_surface_id_) | 172 if (output_surface_id != output_surface_id_) |
| 174 return; | 173 return; |
| 175 ReclaimResources(&ack); | 174 ReclaimResources(&ack); |
| 176 } | 175 } |
| 177 | 176 |
| 178 bool CompositorOutputSurface::Send(IPC::Message* message) { | 177 bool CompositorOutputSurface::Send(IPC::Message* message) { |
| 179 return message_sender_->Send(message); | 178 return message_sender_->Send(message); |
| 180 } | 179 } |
| 181 | 180 |
| 182 } // namespace content | 181 } // namespace content |
| OLD | NEW |