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_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "content/browser/compositor/browser_compositor_output_surface.h" | 9 #include "content/browser/compositor/browser_compositor_output_surface.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 class SoftwareOutputDevice; | 13 class SoftwareOutputDevice; |
14 } | 14 } |
15 | 15 |
16 namespace ui { | |
17 class CompositorVSyncManager; | |
18 } | |
19 | |
20 namespace content { | 16 namespace content { |
21 | 17 |
22 class BrowserCompositorOutputSurfaceProxy; | 18 class BrowserCompositorOutputSurfaceProxy; |
23 | 19 |
24 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface | 20 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface |
25 : public BrowserCompositorOutputSurface { | 21 : public BrowserCompositorOutputSurface { |
26 public: | 22 public: |
27 SoftwareBrowserCompositorOutputSurface( | 23 SoftwareBrowserCompositorOutputSurface( |
28 scoped_refptr<BrowserCompositorOutputSurfaceProxy> surface_proxy, | 24 scoped_refptr<BrowserCompositorOutputSurfaceProxy> surface_proxy, |
29 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 25 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
30 int surface_id, | 26 int surface_id, |
31 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 27 IDMap<BrowserCompositorOutputSurface>* output_surface_map); |
32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | |
33 | 28 |
34 virtual ~SoftwareBrowserCompositorOutputSurface(); | 29 virtual ~SoftwareBrowserCompositorOutputSurface(); |
35 | 30 |
36 private: | 31 private: |
37 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 32 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
38 | 33 |
39 // On the software path we need to explicitly call the proxy to update the | 34 // On the software path we need to explicitly call the proxy to update the |
40 // VSync parameters. | 35 // VSync parameters. |
41 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_; | 36 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_; |
42 | 37 |
43 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); | 38 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); |
44 }; | 39 }; |
45 | 40 |
46 } // namespace content | 41 } // namespace content |
47 | 42 |
48 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ | 43 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ |
OLD | NEW |