OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 12 |
| 13 namespace gpu { |
| 14 class VulkanSurface; |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 |
| 19 class VulkanBrowserCompositorOutputSurface |
| 20 : public BrowserCompositorOutputSurface { |
| 21 public: |
| 22 VulkanBrowserCompositorOutputSurface( |
| 23 const scoped_refptr<cc::VulkanContextProvider>& context, |
| 24 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 25 |
| 26 ~VulkanBrowserCompositorOutputSurface() override; |
| 27 |
| 28 bool Initialize(gfx::AcceleratedWidget widget); |
| 29 void Destroy(); |
| 30 |
| 31 // BrowserCompositorOutputSurface implementation. |
| 32 void OnGpuSwapBuffersCompleted( |
| 33 const std::vector<ui::LatencyInfo>& latency_info, |
| 34 gfx::SwapResult result) override; |
| 35 |
| 36 protected: |
| 37 // cc::OutputSurface implementation. |
| 38 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 39 |
| 40 private: |
| 41 std::unique_ptr<gpu::VulkanSurface> surface_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface); |
| 44 }; |
| 45 |
| 46 } // namespace content |
| 47 |
| 48 #endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H
_ |
OLD | NEW |