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