| 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 #ifndef CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ | 6 #define CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void SwapBuffers(cc::CompositorFrame* frame) override; | 45 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // CompositorOutputSurface overrides. | 48 // CompositorOutputSurface overrides. |
| 49 void OnSwapAck(uint32 output_surface_id, | 49 void OnSwapAck(uint32 output_surface_id, |
| 50 const cc::CompositorFrameAck& ack) override; | 50 const cc::CompositorFrameAck& ack) override; |
| 51 | 51 |
| 52 size_t GetNumAcksPending(); | 52 size_t GetNumAcksPending(); |
| 53 | 53 |
| 54 struct TransferableFrame { | 54 struct TransferableFrame { |
| 55 TransferableFrame() : texture_id(0), sync_point(0) {} | 55 TransferableFrame(); |
| 56 | |
| 57 TransferableFrame(uint32 texture_id, | 56 TransferableFrame(uint32 texture_id, |
| 58 const gpu::Mailbox& mailbox, | 57 const gpu::Mailbox& mailbox, |
| 59 const gfx::Size size) | 58 const gfx::Size size); |
| 60 : texture_id(texture_id), mailbox(mailbox), size(size), sync_point(0) {} | |
| 61 | 59 |
| 62 uint32 texture_id; | 60 uint32 texture_id; |
| 63 gpu::Mailbox mailbox; | 61 gpu::Mailbox mailbox; |
| 62 gpu::SyncToken sync_token; |
| 64 gfx::Size size; | 63 gfx::Size size; |
| 65 uint32 sync_point; | |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 TransferableFrame current_backing_; | 66 TransferableFrame current_backing_; |
| 69 std::deque<TransferableFrame> pending_textures_; | 67 std::deque<TransferableFrame> pending_textures_; |
| 70 std::queue<TransferableFrame> returned_textures_; | 68 std::queue<TransferableFrame> returned_textures_; |
| 71 | 69 |
| 72 uint32 fbo_; | 70 uint32 fbo_; |
| 73 bool is_backbuffer_discarded_; | 71 bool is_backbuffer_discarded_; |
| 74 cc::ResourceFormat format_; | 72 cc::ResourceFormat format_; |
| 75 }; | 73 }; |
| 76 | 74 |
| 77 } // namespace content | 75 } // namespace content |
| 78 | 76 |
| 79 #endif // CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ | 77 #endif // CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ |
| OLD | NEW |