| 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 26 matching lines...) Expand all Loading... |
| 37 scoped_refptr<cc::ContextProvider> worker_context_provider); | 37 scoped_refptr<cc::ContextProvider> worker_context_provider); |
| 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 void SwapBuffers(cc::CompositorFrame* frame) override; | 48 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 void ShortcutSwapAck(uint32_t output_surface_id, | 51 void ShortcutSwapAck(uint32_t output_surface_id, |
| 51 std::unique_ptr<cc::GLFrameData> gl_frame_data); | 52 std::unique_ptr<cc::GLFrameData> gl_frame_data); |
| 52 void OnSwapAck(uint32_t output_surface_id, const cc::CompositorFrameAck& ack); | 53 void OnSwapAck(uint32_t output_surface_id, const cc::CompositorFrameAck& ack); |
| 53 | 54 |
| 54 size_t GetNumAcksPending(); | 55 size_t GetNumAcksPending(); |
| 55 | 56 |
| 56 struct TransferableFrame { | 57 struct TransferableFrame { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 74 uint32_t fbo_; | 75 uint32_t fbo_; |
| 75 bool is_backbuffer_discarded_; | 76 bool is_backbuffer_discarded_; |
| 76 | 77 |
| 77 std::unique_ptr<cc::CompositorFrameAck> previous_frame_ack_; | 78 std::unique_ptr<cc::CompositorFrameAck> previous_frame_ack_; |
| 78 base::WeakPtrFactory<MailboxOutputSurface> weak_ptrs_; | 79 base::WeakPtrFactory<MailboxOutputSurface> weak_ptrs_; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace content | 82 } // namespace content |
| 82 | 83 |
| 83 #endif // CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ | 84 #endif // CONTENT_TEST_MAILBOX_OUTPUT_SURFACE_H_ |
| OLD | NEW |