Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: content/browser/compositor/vulkan_browser_compositor_output_surface.h

Issue 2472433002: Fixed compile- and link-time errors with the "enable_vulkan" GN-argument (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 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 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_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "cc/output/output_surface_frame.h"
11 #include "content/browser/compositor/browser_compositor_output_surface.h" 12 #include "content/browser/compositor/browser_compositor_output_surface.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 14
14 namespace gpu { 15 namespace gpu {
15 class VulkanSurface; 16 class VulkanSurface;
16 } 17 }
17 18
18 namespace content { 19 namespace content {
19 20
20 class VulkanBrowserCompositorOutputSurface 21 class VulkanBrowserCompositorOutputSurface
21 : public BrowserCompositorOutputSurface { 22 : public BrowserCompositorOutputSurface {
22 public: 23 public:
23 VulkanBrowserCompositorOutputSurface( 24 VulkanBrowserCompositorOutputSurface(
24 scoped_refptr<cc::VulkanContextProvider> context, 25 scoped_refptr<cc::VulkanContextProvider> context,
25 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, 26 scoped_refptr<ui::CompositorVSyncManager> vsync_manager,
26 cc::SyntheticBeginFrameSource* begin_frame_source); 27 cc::SyntheticBeginFrameSource* begin_frame_source);
27 28
28 ~VulkanBrowserCompositorOutputSurface() override; 29 ~VulkanBrowserCompositorOutputSurface() override;
29 30
30 bool Initialize(gfx::AcceleratedWidget widget); 31 bool Initialize(gfx::AcceleratedWidget widget);
31 void Destroy(); 32 void Destroy();
32 33
33 // BrowserCompositorOutputSurface implementation.
34 void OnGpuSwapBuffersCompleted(
35 const std::vector<ui::LatencyInfo>& latency_info,
36 gfx::SwapResult result,
37 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override;
38
39 protected:
40 // cc::OutputSurface implementation. 34 // cc::OutputSurface implementation.
41 void SwapBuffers(cc::CompositorFrame* frame) override; 35 void EnsureBackbuffer() override;
36 void DiscardBackbuffer() override;
37 void BindFramebuffer() override;
38 bool IsDisplayedAsOverlayPlane() const override;
39 unsigned GetOverlayTextureId() const override;
40 bool SurfaceIsSuspendForRecycle() const override;
41 void Reshape(const gfx::Size& size,
42 float device_scale_factor,
43 const gfx::ColorSpace& color_space,
44 bool has_alpha) override;
45 uint32_t GetFramebufferCopyTextureFormat() override;
46 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
42 47
43 private: 48 private:
44 std::unique_ptr<gpu::VulkanSurface> surface_; 49 std::unique_ptr<gpu::VulkanSurface> surface_;
45 50
46 DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface); 51 DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface);
47 }; 52 };
48 53
49 } // namespace content 54 } // namespace content
50 55
51 #endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _ 56 #endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698