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" |
(...skipping 17 matching lines...) Expand all Loading... |
28 std::unique_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 cc::SyntheticBeginFrameSource* begin_frame_source); | 30 cc::SyntheticBeginFrameSource* begin_frame_source); |
31 | 31 |
32 ~SoftwareBrowserCompositorOutputSurface() override; | 32 ~SoftwareBrowserCompositorOutputSurface() override; |
33 | 33 |
34 // OutputSurface implementation. | 34 // OutputSurface implementation. |
35 void EnsureBackbuffer() override; | 35 void EnsureBackbuffer() override; |
36 void DiscardBackbuffer() override; | 36 void DiscardBackbuffer() override; |
37 void BindFramebuffer() override; | 37 void BindFramebuffer() override; |
38 void SwapBuffers(cc::CompositorFrame frame) override; | 38 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
39 bool IsDisplayedAsOverlayPlane() const override; | 39 bool IsDisplayedAsOverlayPlane() const override; |
40 unsigned GetOverlayTextureId() const override; | 40 unsigned GetOverlayTextureId() const override; |
41 bool SurfaceIsSuspendForRecycle() const override; | 41 bool SurfaceIsSuspendForRecycle() const override; |
42 uint32_t GetFramebufferCopyTextureFormat() override; | 42 uint32_t GetFramebufferCopyTextureFormat() override; |
43 | 43 |
44 private: | 44 private: |
45 // BrowserCompositorOutputSurface implementation. | 45 // BrowserCompositorOutputSurface implementation. |
46 void OnGpuSwapBuffersCompleted( | 46 void OnGpuSwapBuffersCompleted( |
47 const std::vector<ui::LatencyInfo>& latency_info, | 47 const std::vector<ui::LatencyInfo>& latency_info, |
48 gfx::SwapResult result, | 48 gfx::SwapResult result, |
49 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override; | 49 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override; |
50 | 50 |
51 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
52 void SetSurfaceSuspendedForRecycle(bool suspended) override; | 52 void SetSurfaceSuspendedForRecycle(bool suspended) override; |
53 #endif | 53 #endif |
54 | 54 |
55 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; | 55 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); | 57 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace content | 60 } // namespace content |
61 | 61 |
62 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ | 62 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ |
OLD | NEW |