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 |
11 namespace content { | 15 namespace content { |
12 class CommandBufferProxyImpl; | 16 class CommandBufferProxyImpl; |
13 class BrowserCompositorOverlayCandidateValidator; | 17 class BrowserCompositorOverlayCandidateValidator; |
14 | 18 |
15 // Adapts a WebGraphicsContext3DCommandBufferImpl into a | 19 // Adapts a WebGraphicsContext3DCommandBufferImpl into a |
16 // cc::OutputSurface that also handles vsync parameter updates | 20 // cc::OutputSurface that also handles vsync parameter updates |
17 // arriving from the GPU process. | 21 // arriving from the GPU process. |
18 class GpuBrowserCompositorOutputSurface | 22 class GpuBrowserCompositorOutputSurface |
19 : public BrowserCompositorOutputSurface { | 23 : public BrowserCompositorOutputSurface { |
20 public: | 24 public: |
21 GpuBrowserCompositorOutputSurface( | 25 GpuBrowserCompositorOutputSurface( |
22 const scoped_refptr<ContextProviderCommandBuffer>& context, | 26 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 27 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
23 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 28 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
24 overlay_candidate_validator); | 29 overlay_candidate_validator); |
25 | 30 |
26 ~GpuBrowserCompositorOutputSurface() override; | 31 ~GpuBrowserCompositorOutputSurface() override; |
27 | 32 |
28 protected: | 33 protected: |
29 // cc::OutputSurface implementation. | 34 // cc::OutputSurface implementation. |
30 void SwapBuffers(cc::CompositorFrame* frame) override; | 35 void SwapBuffers(cc::CompositorFrame* frame) override; |
31 bool BindToClient(cc::OutputSurfaceClient* client) override; | 36 bool BindToClient(cc::OutputSurfaceClient* client) override; |
32 | 37 |
(...skipping 23 matching lines...) Expand all Loading... |
56 base::CancelableCallback<void(base::TimeTicks timebase, | 61 base::CancelableCallback<void(base::TimeTicks timebase, |
57 base::TimeDelta interval)> | 62 base::TimeDelta interval)> |
58 update_vsync_parameters_callback_; | 63 update_vsync_parameters_callback_; |
59 | 64 |
60 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 65 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
61 }; | 66 }; |
62 | 67 |
63 } // namespace content | 68 } // namespace content |
64 | 69 |
65 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 70 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |