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_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 scoped_refptr<ContextProviderCommandBuffer> context, | 33 scoped_refptr<ContextProviderCommandBuffer> context, |
34 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 34 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
35 cc::SyntheticBeginFrameSource* begin_frame_source, | 35 cc::SyntheticBeginFrameSource* begin_frame_source, |
36 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 36 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
37 overlay_candidate_validator); | 37 overlay_candidate_validator); |
38 | 38 |
39 ~MusBrowserCompositorOutputSurface() override; | 39 ~MusBrowserCompositorOutputSurface() override; |
40 | 40 |
41 protected: | 41 protected: |
42 // cc::OutputSurface implementation. | 42 // cc::OutputSurface implementation. |
43 void SwapBuffers(cc::CompositorFrame frame) override; | 43 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
44 bool BindToClient(cc::OutputSurfaceClient* client) override; | 44 bool BindToClient(cc::OutputSurfaceClient* client) override; |
45 | 45 |
46 // ui::WindowSurfaceClient: | 46 // ui::WindowSurfaceClient: |
47 void OnResourcesReturned( | 47 void OnResourcesReturned( |
48 ui::WindowSurface* surface, | 48 ui::WindowSurface* surface, |
49 mojo::Array<cc::ReturnedResource> resources) override; | 49 mojo::Array<cc::ReturnedResource> resources) override; |
50 | 50 |
51 private: | 51 private: |
52 uint32_t AllocateResourceId(); | 52 uint32_t AllocateResourceId(); |
53 void FreeResourceId(uint32_t id); | 53 void FreeResourceId(uint32_t id); |
54 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); | 54 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); |
55 | 55 |
56 ui::Window* ui_window_; | 56 ui::Window* ui_window_; |
57 std::unique_ptr<ui::WindowSurface> ui_window_surface_; | 57 std::unique_ptr<ui::WindowSurface> ui_window_surface_; |
58 std::vector<uint32_t> free_resource_ids_; | 58 std::vector<uint32_t> free_resource_ids_; |
59 std::vector<gpu::Mailbox> mailboxes_; | 59 std::vector<gpu::Mailbox> mailboxes_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); | 61 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace content | 64 } // namespace content |
65 | 65 |
66 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 66 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |