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 #include "ui/gfx/native_widget_types.h" |
| 13 |
| 14 namespace gpu { |
| 15 class VulkanSurface; |
| 16 } |
| 17 |
| 18 namespace content { |
| 19 |
| 20 class VulkanBrowserCompositorOutputSurface |
| 21 : public BrowserCompositorOutputSurface { |
| 22 public: |
| 23 VulkanBrowserCompositorOutputSurface( |
| 24 const scoped_refptr<cc::VulkanContextProvider>& context, |
| 25 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 26 |
| 27 ~VulkanBrowserCompositorOutputSurface() override; |
| 28 |
| 29 bool Initialize(gfx::AcceleratedWidget widget); |
| 30 void Destroy(); |
| 31 |
| 32 // BrowserCompositorOutputSurface implementation. |
| 33 void OnGpuSwapBuffersCompleted( |
| 34 const std::vector<ui::LatencyInfo>& latency_info, |
| 35 gfx::SwapResult result) override; |
| 36 |
| 37 protected: |
| 38 // cc::OutputSurface implementation. |
| 39 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 40 |
| 41 private: |
| 42 std::unique_ptr<gpu::VulkanSurface> surface_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface); |
| 45 }; |
| 46 |
| 47 } // namespace content |
| 48 |
| 49 #endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H
_ |
OLD | NEW |