| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "content/browser/compositor/browser_compositor_output_surface.h" | 11 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class SoftwareOutputDevice; | 15 class SoftwareOutputDevice; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 class CompositorVSyncManager; | 19 class CompositorVSyncManager; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface | 24 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface |
| 25 : public BrowserCompositorOutputSurface { | 25 : public BrowserCompositorOutputSurface { |
| 26 public: | 26 public: |
| 27 SoftwareBrowserCompositorOutputSurface( | 27 SoftwareBrowserCompositorOutputSurface( |
| 28 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 28 std::unique_ptr<cc::SoftwareOutputDevice> software_device, |
| 29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 30 | 30 |
| 31 ~SoftwareBrowserCompositorOutputSurface() override; | 31 ~SoftwareBrowserCompositorOutputSurface() override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 void SwapBuffers(cc::CompositorFrame* frame) override; | 34 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 35 void OnGpuSwapBuffersCompleted( | 35 void OnGpuSwapBuffersCompleted( |
| 36 const std::vector<ui::LatencyInfo>& latency_info, | 36 const std::vector<ui::LatencyInfo>& latency_info, |
| 37 gfx::SwapResult result) override; | 37 gfx::SwapResult result) override; |
| 38 | 38 |
| 39 #if defined(OS_MACOSX) | 39 #if defined(OS_MACOSX) |
| 40 void SetSurfaceSuspendedForRecycle(bool suspended) override; | 40 void SetSurfaceSuspendedForRecycle(bool suspended) override; |
| 41 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override; | 41 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override; |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; | 44 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); | 46 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace content | 49 } // namespace content |
| 50 | 50 |
| 51 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ | 51 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ |
| OLD | NEW |