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 |
16 namespace content { | 20 namespace content { |
17 | 21 |
18 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface | 22 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface |
19 : public BrowserCompositorOutputSurface { | 23 : public BrowserCompositorOutputSurface { |
20 public: | 24 public: |
21 SoftwareBrowserCompositorOutputSurface( | 25 SoftwareBrowserCompositorOutputSurface( |
22 scoped_ptr<cc::SoftwareOutputDevice> software_device); | 26 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| 27 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
23 | 28 |
24 ~SoftwareBrowserCompositorOutputSurface() override; | 29 ~SoftwareBrowserCompositorOutputSurface() override; |
25 | 30 |
26 private: | 31 private: |
27 void SwapBuffers(cc::CompositorFrame* frame) override; | 32 void SwapBuffers(cc::CompositorFrame* frame) override; |
28 | 33 |
29 #if defined(OS_MACOSX) | 34 #if defined(OS_MACOSX) |
30 void OnSurfaceDisplayed() override; | 35 void OnSurfaceDisplayed() override; |
31 void SetSurfaceSuspendedForRecycle(bool suspended) override; | 36 void SetSurfaceSuspendedForRecycle(bool suspended) override; |
32 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override; | 37 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override; |
33 #endif | 38 #endif |
34 | 39 |
35 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; | 40 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; |
36 | 41 |
37 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); | 42 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); |
38 }; | 43 }; |
39 | 44 |
40 } // namespace content | 45 } // namespace content |
41 | 46 |
42 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ | 47 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ |
OLD | NEW |