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

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

Issue 2511273002: Decouple BrowserCompositorOutputSurface from BeginFrameSource. (Closed)
Patch Set: Bring back GpuBrowserCompositorOutputSurface destructor Created 4 years 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 "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "cc/output/output_surface_frame.h" 12 #include "cc/output/output_surface_frame.h"
13 #include "content/browser/compositor/browser_compositor_output_surface.h" 13 #include "content/browser/compositor/browser_compositor_output_surface.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 namespace gpu { 16 namespace gpu {
17 class VulkanSurface; 17 class VulkanSurface;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 21
22 class VulkanBrowserCompositorOutputSurface 22 class VulkanBrowserCompositorOutputSurface
23 : public BrowserCompositorOutputSurface { 23 : public BrowserCompositorOutputSurface {
24 public: 24 public:
25 VulkanBrowserCompositorOutputSurface( 25 VulkanBrowserCompositorOutputSurface(
26 scoped_refptr<cc::VulkanContextProvider> context, 26 scoped_refptr<cc::VulkanContextProvider> context,
27 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, 27 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
28 cc::SyntheticBeginFrameSource* begin_frame_source); 28 cc::SyntheticBeginFrameSource* begin_frame_source);
29 29
30 ~VulkanBrowserCompositorOutputSurface() override; 30 ~VulkanBrowserCompositorOutputSurface() override;
31 31
32 bool Initialize(gfx::AcceleratedWidget widget); 32 bool Initialize(gfx::AcceleratedWidget widget);
33 void Destroy(); 33 void Destroy();
34 34
35 // cc::OutputSurface implementation. 35 // cc::OutputSurface implementation.
36 void BindToClient(cc::OutputSurfaceClient* client) override; 36 void BindToClient(cc::OutputSurfaceClient* client) override;
37 void EnsureBackbuffer() override; 37 void EnsureBackbuffer() override;
(...skipping 15 matching lines...) Expand all
53 std::unique_ptr<gpu::VulkanSurface> surface_; 53 std::unique_ptr<gpu::VulkanSurface> surface_;
54 cc::OutputSurfaceClient* client_ = nullptr; 54 cc::OutputSurfaceClient* client_ = nullptr;
55 base::WeakPtrFactory<VulkanBrowserCompositorOutputSurface> weak_ptr_factory_; 55 base::WeakPtrFactory<VulkanBrowserCompositorOutputSurface> weak_ptr_factory_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface); 57 DISALLOW_COPY_AND_ASSIGN(VulkanBrowserCompositorOutputSurface);
58 }; 58 };
59 59
60 } // namespace content 60 } // namespace content
61 61
62 #endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _ 62 #endif // CONTENT_BROWSER_COMPOSITOR_VULKAN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698