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

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

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase Created 3 years, 7 months 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 "content/browser/compositor/gpu_vsync_begin_frame_source.h" 14 #include "content/browser/compositor/gpu_vsync_begin_frame_source.h"
15 #include "ui/gfx/swap_result.h" 15 #include "ui/gfx/swap_result.h"
16 16
17 namespace display_compositor { 17 namespace viz {
18 class CompositorOverlayCandidateValidator; 18 class CompositorOverlayCandidateValidator;
19 } 19 }
20 20
21 namespace gpu { 21 namespace gpu {
22 class CommandBufferProxyImpl; 22 class CommandBufferProxyImpl;
23 struct GpuProcessHostedCALayerTreeParamsMac; 23 struct GpuProcessHostedCALayerTreeParamsMac;
24 } 24 }
25 25
26 namespace ui { 26 namespace ui {
27 class ContextProviderCommandBuffer; 27 class ContextProviderCommandBuffer;
28 class LatencyInfo; 28 class LatencyInfo;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 class ReflectorTexture; 32 class ReflectorTexture;
33 33
34 // Adapts a WebGraphicsContext3DCommandBufferImpl into a 34 // Adapts a WebGraphicsContext3DCommandBufferImpl into a
35 // cc::OutputSurface that also handles vsync parameter updates 35 // cc::OutputSurface that also handles vsync parameter updates
36 // arriving from the GPU process. 36 // arriving from the GPU process.
37 class GpuBrowserCompositorOutputSurface : public BrowserCompositorOutputSurface, 37 class GpuBrowserCompositorOutputSurface : public BrowserCompositorOutputSurface,
38 public GpuVSyncControl { 38 public GpuVSyncControl {
39 public: 39 public:
40 GpuBrowserCompositorOutputSurface( 40 GpuBrowserCompositorOutputSurface(
41 scoped_refptr<ui::ContextProviderCommandBuffer> context, 41 scoped_refptr<ui::ContextProviderCommandBuffer> context,
42 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, 42 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
43 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 43 std::unique_ptr<viz::CompositorOverlayCandidateValidator>
44 overlay_candidate_validator); 44 overlay_candidate_validator);
45 45
46 ~GpuBrowserCompositorOutputSurface() override; 46 ~GpuBrowserCompositorOutputSurface() override;
47 47
48 // Called when a swap completion is sent from the GPU process. 48 // Called when a swap completion is sent from the GPU process.
49 // The argument |params_mac| is used to communicate parameters needed on Mac 49 // The argument |params_mac| is used to communicate parameters needed on Mac
50 // to display the CALayer for the swap in the browser process. 50 // to display the CALayer for the swap in the browser process.
51 // TODO(ccameron): Remove |params_mac| when the CALayer tree is hosted in the 51 // TODO(ccameron): Remove |params_mac| when the CALayer tree is hosted in the
52 // browser process. 52 // browser process.
53 virtual void OnGpuSwapBuffersCompleted( 53 virtual void OnGpuSwapBuffersCompleted(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 gfx::Size size_; 93 gfx::Size size_;
94 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_; 94 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_;
95 95
96 private: 96 private:
97 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 97 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
98 }; 98 };
99 99
100 } // namespace content 100 } // namespace content
101 101
102 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 102 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698