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 "content/browser/compositor/browser_compositor_output_surface.h" | 8 #include "content/browser/compositor/browser_compositor_output_surface.h" |
9 | 9 |
| 10 namespace ui { |
| 11 class CompositorVSyncManager; |
| 12 } |
| 13 |
10 namespace content { | 14 namespace content { |
11 | 15 |
12 // Adapts a WebGraphicsContext3DCommandBufferImpl into a | 16 // Adapts a WebGraphicsContext3DCommandBufferImpl into a |
13 // cc::OutputSurface that also handles vsync parameter updates | 17 // cc::OutputSurface that also handles vsync parameter updates |
14 // arriving from the GPU process. | 18 // arriving from the GPU process. |
15 class GpuBrowserCompositorOutputSurface | 19 class GpuBrowserCompositorOutputSurface |
16 : public BrowserCompositorOutputSurface { | 20 : public BrowserCompositorOutputSurface { |
17 public: | 21 public: |
18 GpuBrowserCompositorOutputSurface( | 22 GpuBrowserCompositorOutputSurface( |
19 const scoped_refptr<ContextProviderCommandBuffer>& context, | 23 const scoped_refptr<ContextProviderCommandBuffer>& context, |
20 int surface_id, | 24 int surface_id, |
21 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 25 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
22 base::MessageLoopProxy* compositor_message_loop, | 26 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
23 base::WeakPtr<ui::Compositor> compositor); | |
24 | 27 |
25 virtual ~GpuBrowserCompositorOutputSurface(); | 28 virtual ~GpuBrowserCompositorOutputSurface(); |
26 | 29 |
27 private: | 30 private: |
28 // cc::OutputSurface implementation. | 31 // cc::OutputSurface implementation. |
29 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 32 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
30 | 33 |
31 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 34 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
32 }; | 35 }; |
33 | 36 |
34 } // namespace content | 37 } // namespace content |
35 | 38 |
36 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 39 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |