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 #include "ui/gfx/swap_result.h" | 10 #include "ui/gfx/swap_result.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 class CompositorVSyncManager; | 13 class CompositorVSyncManager; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class CommandBufferProxyImpl; | 17 class CommandBufferProxyImpl; |
18 class BrowserCompositorOverlayCandidateValidator; | 18 class BrowserCompositorOverlayCandidateValidator; |
19 class ReflectorTexture; | 19 class ReflectorTexture; |
20 | 20 |
21 // Adapts a WebGraphicsContext3DCommandBufferImpl into a | 21 // Adapts a WebGraphicsContext3DCommandBufferImpl into a |
22 // cc::OutputSurface that also handles vsync parameter updates | 22 // cc::OutputSurface that also handles vsync parameter updates |
23 // arriving from the GPU process. | 23 // arriving from the GPU process. |
24 class GpuBrowserCompositorOutputSurface | 24 class GpuBrowserCompositorOutputSurface |
25 : public BrowserCompositorOutputSurface { | 25 : public BrowserCompositorOutputSurface { |
26 public: | 26 public: |
27 GpuBrowserCompositorOutputSurface( | 27 GpuBrowserCompositorOutputSurface( |
28 const scoped_refptr<ContextProviderCommandBuffer>& context, | 28 const scoped_refptr<ContextProviderCommandBuffer>& context, |
29 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, | |
30 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
31 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 30 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
32 overlay_candidate_validator); | 31 overlay_candidate_validator); |
33 | 32 |
34 ~GpuBrowserCompositorOutputSurface() override; | 33 ~GpuBrowserCompositorOutputSurface() override; |
35 | 34 |
36 protected: | 35 protected: |
37 // BrowserCompositorOutputSurface: | 36 // BrowserCompositorOutputSurface: |
38 void OnReflectorChanged() override; | 37 void OnReflectorChanged() override; |
39 | 38 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 update_vsync_parameters_callback_; | 72 update_vsync_parameters_callback_; |
74 | 73 |
75 scoped_ptr<ReflectorTexture> reflector_texture_; | 74 scoped_ptr<ReflectorTexture> reflector_texture_; |
76 | 75 |
77 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 76 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
78 }; | 77 }; |
79 | 78 |
80 } // namespace content | 79 } // namespace content |
81 | 80 |
82 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 81 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |