OLD | NEW |
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 "base/cancelable_callback.h" | 8 #include "base/cancelable_callback.h" |
9 #include "content/browser/compositor/browser_compositor_output_surface.h" | 9 #include "content/browser/compositor/browser_compositor_output_surface.h" |
10 | 10 |
11 namespace ui { | |
12 class CompositorVSyncManager; | |
13 } | |
14 | |
15 namespace cc { | 11 namespace cc { |
16 class OverlayCandidateValidator; | 12 class OverlayCandidateValidator; |
17 } | 13 } |
18 | 14 |
19 namespace content { | 15 namespace content { |
20 class CommandBufferProxyImpl; | 16 class CommandBufferProxyImpl; |
21 | 17 |
22 // Adapts a WebGraphicsContext3DCommandBufferImpl into a | 18 // Adapts a WebGraphicsContext3DCommandBufferImpl into a |
23 // cc::OutputSurface that also handles vsync parameter updates | 19 // cc::OutputSurface that also handles vsync parameter updates |
24 // arriving from the GPU process. | 20 // arriving from the GPU process. |
25 class GpuBrowserCompositorOutputSurface | 21 class GpuBrowserCompositorOutputSurface |
26 : public BrowserCompositorOutputSurface { | 22 : public BrowserCompositorOutputSurface { |
27 public: | 23 public: |
28 GpuBrowserCompositorOutputSurface( | 24 GpuBrowserCompositorOutputSurface( |
29 const scoped_refptr<ContextProviderCommandBuffer>& context, | 25 const scoped_refptr<ContextProviderCommandBuffer>& context, |
30 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | |
31 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); | 26 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); |
32 | 27 |
33 ~GpuBrowserCompositorOutputSurface() override; | 28 ~GpuBrowserCompositorOutputSurface() override; |
34 | 29 |
35 protected: | 30 protected: |
36 // cc::OutputSurface implementation. | 31 // cc::OutputSurface implementation. |
37 void SwapBuffers(cc::CompositorFrame* frame) override; | 32 void SwapBuffers(cc::CompositorFrame* frame) override; |
38 bool BindToClient(cc::OutputSurfaceClient* client) override; | 33 bool BindToClient(cc::OutputSurfaceClient* client) override; |
39 | 34 |
40 #if defined(OS_MACOSX) | 35 #if defined(OS_MACOSX) |
(...skipping 11 matching lines...) Expand all Loading... |
52 base::CancelableCallback<void(base::TimeTicks timebase, | 47 base::CancelableCallback<void(base::TimeTicks timebase, |
53 base::TimeDelta interval)> | 48 base::TimeDelta interval)> |
54 update_vsync_parameters_callback_; | 49 update_vsync_parameters_callback_; |
55 | 50 |
56 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 51 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
57 }; | 52 }; |
58 | 53 |
59 } // namespace content | 54 } // namespace content |
60 | 55 |
61 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 56 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |