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

Side by Side Diff: content/browser/compositor/gpu_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_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 "build/build_config.h" 12 #include "build/build_config.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/swap_result.h" 14 #include "ui/gfx/swap_result.h"
15 15
16 namespace display_compositor { 16 namespace display_compositor {
17 class CompositorOverlayCandidateValidator; 17 class CompositorOverlayCandidateValidator;
18 } 18 }
19 19
20 namespace gpu { 20 namespace gpu {
21 class CommandBufferProxyImpl; 21 class CommandBufferProxyImpl;
22 struct GpuProcessHostedCALayerTreeParamsMac; 22 struct GpuProcessHostedCALayerTreeParamsMac;
23 } 23 }
24 24
25 namespace ui { 25 namespace ui {
26 class CompositorVSyncManager;
27 class LatencyInfo; 26 class LatencyInfo;
28 } 27 }
29 28
30 namespace content { 29 namespace content {
31 class ContextProviderCommandBuffer; 30 class ContextProviderCommandBuffer;
32 class ReflectorTexture; 31 class ReflectorTexture;
33 32
34 // Adapts a WebGraphicsContext3DCommandBufferImpl into a 33 // Adapts a WebGraphicsContext3DCommandBufferImpl into a
35 // cc::OutputSurface that also handles vsync parameter updates 34 // cc::OutputSurface that also handles vsync parameter updates
36 // arriving from the GPU process. 35 // arriving from the GPU process.
37 class GpuBrowserCompositorOutputSurface 36 class GpuBrowserCompositorOutputSurface
38 : public BrowserCompositorOutputSurface { 37 : public BrowserCompositorOutputSurface {
39 public: 38 public:
40 GpuBrowserCompositorOutputSurface( 39 GpuBrowserCompositorOutputSurface(
41 scoped_refptr<ContextProviderCommandBuffer> context, 40 scoped_refptr<ContextProviderCommandBuffer> context,
42 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, 41 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
43 cc::SyntheticBeginFrameSource* begin_frame_source,
44 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 42 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
45 overlay_candidate_validator); 43 overlay_candidate_validator);
46 44
47 ~GpuBrowserCompositorOutputSurface() override; 45 ~GpuBrowserCompositorOutputSurface() override;
48 46
49 // Called when a swap completion is sent from the GPU process. 47 // Called when a swap completion is sent from the GPU process.
50 // The argument |params_mac| is used to communicate parameters needed on Mac 48 // The argument |params_mac| is used to communicate parameters needed on Mac
51 // to display the CALayer for the swap in the browser process. 49 // to display the CALayer for the swap in the browser process.
52 // TODO(ccameron): Remove |params_mac| when the CALayer tree is hosted in the 50 // TODO(ccameron): Remove |params_mac| when the CALayer tree is hosted in the
53 // browser process. 51 // browser process.
(...skipping 30 matching lines...) Expand all
84 std::unique_ptr<ReflectorTexture> reflector_texture_; 82 std::unique_ptr<ReflectorTexture> reflector_texture_;
85 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_; 83 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_;
86 84
87 private: 85 private:
88 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 86 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
89 }; 87 };
90 88
91 } // namespace content 89 } // namespace content
92 90
93 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 91 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698