| 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 29 matching lines...) Expand all Loading... |
| 40 public: | 40 public: |
| 41 // TODO(mfomitchev): Remove this constructor once we complete the switch to | 41 // TODO(mfomitchev): Remove this constructor once we complete the switch to |
| 42 // Aura-Mus. | 42 // Aura-Mus. |
| 43 MusBrowserCompositorOutputSurface( | 43 MusBrowserCompositorOutputSurface( |
| 44 ui::Window* window, | 44 ui::Window* window, |
| 45 scoped_refptr<ContextProviderCommandBuffer> context, | 45 scoped_refptr<ContextProviderCommandBuffer> context, |
| 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 47 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 47 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
| 48 cc::SyntheticBeginFrameSource* begin_frame_source, | 48 cc::SyntheticBeginFrameSource* begin_frame_source, |
| 49 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 49 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| 50 overlay_candidate_validator); | 50 overlay_candidate_validator, |
| 51 float device_scale_factor); |
| 51 | 52 |
| 52 MusBrowserCompositorOutputSurface( | 53 MusBrowserCompositorOutputSurface( |
| 53 aura::Window* window, | 54 aura::Window* window, |
| 54 scoped_refptr<ContextProviderCommandBuffer> context, | 55 scoped_refptr<ContextProviderCommandBuffer> context, |
| 55 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 56 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 56 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 57 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
| 57 cc::SyntheticBeginFrameSource* begin_frame_source, | 58 cc::SyntheticBeginFrameSource* begin_frame_source, |
| 58 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 59 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| 59 overlay_candidate_validator); | 60 overlay_candidate_validator, |
| 61 float device_scale_factor); |
| 60 | 62 |
| 61 ~MusBrowserCompositorOutputSurface() override; | 63 ~MusBrowserCompositorOutputSurface() override; |
| 62 | 64 |
| 63 protected: | 65 protected: |
| 64 // cc::OutputSurface implementation. | 66 // cc::OutputSurface implementation. |
| 65 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 67 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
| 66 | 68 |
| 67 // cc::CompositorFrameSinkClient: | 69 // cc::CompositorFrameSinkClient: |
| 68 void SetBeginFrameSource(cc::BeginFrameSource* source) override; | 70 void SetBeginFrameSource(cc::BeginFrameSource* source) override; |
| 69 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 71 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 82 uint32_t AllocateResourceId(); | 84 uint32_t AllocateResourceId(); |
| 83 void FreeResourceId(uint32_t id); | 85 void FreeResourceId(uint32_t id); |
| 84 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); | 86 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); |
| 85 | 87 |
| 86 // TODO(mfomitchev): Remove once we complete the switch to Aura-Mus. | 88 // TODO(mfomitchev): Remove once we complete the switch to Aura-Mus. |
| 87 ui::Window* ui_window_; | 89 ui::Window* ui_window_; |
| 88 std::unique_ptr<ui::WindowCompositorFrameSink> ui_compositor_frame_sink_; | 90 std::unique_ptr<ui::WindowCompositorFrameSink> ui_compositor_frame_sink_; |
| 89 | 91 |
| 90 aura::Window* window_; | 92 aura::Window* window_; |
| 91 std::unique_ptr<aura::WindowCompositorFrameSink> compositor_frame_sink_; | 93 std::unique_ptr<aura::WindowCompositorFrameSink> compositor_frame_sink_; |
| 94 float device_scale_factor_; |
| 92 std::vector<uint32_t> free_resource_ids_; | 95 std::vector<uint32_t> free_resource_ids_; |
| 93 std::vector<gpu::Mailbox> mailboxes_; | 96 std::vector<gpu::Mailbox> mailboxes_; |
| 94 | 97 |
| 95 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); | 98 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace content | 101 } // namespace content |
| 99 | 102 |
| 100 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 103 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |