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 #ifndef CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ |
6 #define CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ | 6 #define CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 ~MailboxOutputSurface() override; | 38 ~MailboxOutputSurface() override; |
39 | 39 |
40 // cc::OutputSurface implementation. | 40 // cc::OutputSurface implementation. |
41 bool BindToClient(cc::OutputSurfaceClient* client) override; | 41 bool BindToClient(cc::OutputSurfaceClient* client) override; |
42 void DetachFromClient() override; | 42 void DetachFromClient() override; |
43 void EnsureBackbuffer() override; | 43 void EnsureBackbuffer() override; |
44 void DiscardBackbuffer() override; | 44 void DiscardBackbuffer() override; |
45 void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override; | 45 void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override; |
46 void BindFramebuffer() override; | 46 void BindFramebuffer() override; |
47 uint32_t GetFramebufferCopyTextureFormat() override; | 47 uint32_t GetFramebufferCopyTextureFormat() override; |
48 void SwapBuffers(cc::CompositorFrame* frame) override; | 48 void SwapBuffers(cc::CompositorFrame frame) override; |
49 | 49 |
50 private: | 50 private: |
51 void ShortcutSwapAck(uint32_t output_surface_id, | 51 void ShortcutSwapAck(uint32_t output_surface_id, |
52 std::unique_ptr<cc::GLFrameData> gl_frame_data); | 52 std::unique_ptr<cc::GLFrameData> gl_frame_data); |
53 void OnSwapAck(uint32_t output_surface_id, const cc::CompositorFrameAck& ack); | 53 void OnSwapAck(uint32_t output_surface_id, const cc::CompositorFrameAck& ack); |
54 | 54 |
55 size_t GetNumAcksPending(); | 55 size_t GetNumAcksPending(); |
56 | 56 |
57 struct TransferableFrame { | 57 struct TransferableFrame { |
58 TransferableFrame(); | 58 TransferableFrame(); |
(...skipping 16 matching lines...) Expand all Loading... |
75 uint32_t fbo_; | 75 uint32_t fbo_; |
76 bool is_backbuffer_discarded_; | 76 bool is_backbuffer_discarded_; |
77 | 77 |
78 std::unique_ptr<cc::CompositorFrameAck> previous_frame_ack_; | 78 std::unique_ptr<cc::CompositorFrameAck> previous_frame_ack_; |
79 base::WeakPtrFactory<MailboxOutputSurface> weak_ptrs_; | 79 base::WeakPtrFactory<MailboxOutputSurface> weak_ptrs_; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace content | 82 } // namespace content |
83 | 83 |
84 #endif // CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ | 84 #endif // CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ |
OLD | NEW |