OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/test/mailbox_output_surface.h" | 5 #include "content/test/mailbox_output_surface.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
10 #include "cc/output/gl_frame_data.h" | 10 #include "cc/output/gl_frame_data.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 if (!previous_frame_ack_) { | 211 if (!previous_frame_ack_) { |
212 previous_frame_ack_.reset(new cc::CompositorFrameAck); | 212 previous_frame_ack_.reset(new cc::CompositorFrameAck); |
213 previous_frame_ack_->gl_frame_data.reset(new cc::GLFrameData); | 213 previous_frame_ack_->gl_frame_data.reset(new cc::GLFrameData); |
214 } | 214 } |
215 | 215 |
216 OnSwapAck(output_surface_id, *previous_frame_ack_); | 216 OnSwapAck(output_surface_id, *previous_frame_ack_); |
217 | 217 |
218 previous_frame_ack_->gl_frame_data = std::move(gl_frame_data); | 218 previous_frame_ack_->gl_frame_data = std::move(gl_frame_data); |
219 } | 219 } |
220 | 220 |
221 void MailboxOutputSurface::SwapBuffers(cc::CompositorFrame* frame) { | 221 void MailboxOutputSurface::SwapBuffers( |
| 222 std::unique_ptr<cc::CompositorFrame> frame) { |
222 // This class is here to support layout tests that are currently | 223 // This class is here to support layout tests that are currently |
223 // doing a readback in the renderer instead of the browser. So they | 224 // doing a readback in the renderer instead of the browser. So they |
224 // are using deprecated code paths in the renderer and don't need to | 225 // are using deprecated code paths in the renderer and don't need to |
225 // actually swap anything to the browser. We shortcut the swap to the | 226 // actually swap anything to the browser. We shortcut the swap to the |
226 // browser here and just ack directly within the renderer process. | 227 // browser here and just ack directly within the renderer process. |
227 // Once crbug.com/311404 is fixed, this can be removed. | 228 // Once crbug.com/311404 is fixed, this can be removed. |
228 | 229 |
229 // This would indicate that crbug.com/311404 is being fixed, and this | 230 // This would indicate that crbug.com/311404 is being fixed, and this |
230 // block needs to be removed. | 231 // block needs to be removed. |
231 DCHECK(!frame->delegated_frame_data); | 232 DCHECK(!frame->delegated_frame_data); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 264 |
264 MailboxOutputSurface::TransferableFrame::TransferableFrame() : texture_id(0) {} | 265 MailboxOutputSurface::TransferableFrame::TransferableFrame() : texture_id(0) {} |
265 | 266 |
266 MailboxOutputSurface::TransferableFrame::TransferableFrame( | 267 MailboxOutputSurface::TransferableFrame::TransferableFrame( |
267 uint32_t texture_id, | 268 uint32_t texture_id, |
268 const gpu::Mailbox& mailbox, | 269 const gpu::Mailbox& mailbox, |
269 const gfx::Size size) | 270 const gfx::Size size) |
270 : texture_id(texture_id), mailbox(mailbox), size(size) {} | 271 : texture_id(texture_id), mailbox(mailbox), size(size) {} |
271 | 272 |
272 } // namespace content | 273 } // namespace content |
OLD | NEW |