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 { | 11 namespace ui { |
12 class CompositorVSyncManager; | 12 class CompositorVSyncManager; |
13 } | 13 } |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 class OverlayCandidateValidator; | 16 class OverlayCandidateValidator; |
17 } | 17 } |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 class CommandBufferProxyImpl; | 20 class CommandBufferProxyImpl; |
21 | 21 |
22 // Adapts a WebGraphicsContext3DCommandBufferImpl into a | 22 // Adapts a WebGraphicsContext3DCommandBufferImpl into a |
23 // cc::OutputSurface that also handles vsync parameter updates | 23 // cc::OutputSurface that also handles vsync parameter updates |
24 // arriving from the GPU process. | 24 // arriving from the GPU process. |
25 class GpuBrowserCompositorOutputSurface | 25 class GpuBrowserCompositorOutputSurface |
26 : public BrowserCompositorOutputSurface { | 26 : public BrowserCompositorOutputSurface { |
27 public: | 27 public: |
28 GpuBrowserCompositorOutputSurface( | 28 GpuBrowserCompositorOutputSurface( |
29 const scoped_refptr<ContextProviderCommandBuffer>& context, | 29 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 30 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
30 int surface_id, | 31 int surface_id, |
31 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 32 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 33 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
33 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); | 34 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); |
34 | 35 |
35 ~GpuBrowserCompositorOutputSurface() override; | 36 ~GpuBrowserCompositorOutputSurface() override; |
36 | 37 |
37 protected: | 38 protected: |
38 // cc::OutputSurface implementation. | 39 // cc::OutputSurface implementation. |
39 void SwapBuffers(cc::CompositorFrame* frame) override; | 40 void SwapBuffers(cc::CompositorFrame* frame) override; |
(...skipping 11 matching lines...) Expand all Loading... |
51 | 52 |
52 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)> | 53 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)> |
53 swap_buffers_completion_callback_; | 54 swap_buffers_completion_callback_; |
54 | 55 |
55 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 56 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
56 }; | 57 }; |
57 | 58 |
58 } // namespace content | 59 } // namespace content |
59 | 60 |
60 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 61 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |