| 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_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "cc/output/output_surface.h" | 8 #include "cc/output/output_surface.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 class Display; | 11 class Display; |
| 12 class SurfaceManager; | 12 class SurfaceManager; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // This class is maps a compositor OutputSurface to the surface system's Display | 17 // This class is maps a compositor OutputSurface to the surface system's Display |
| 18 // concept, allowing a compositor client to submit frames for a native root | 18 // concept, allowing a compositor client to submit frames for a native root |
| 19 // window or physical display. | 19 // window or physical display. |
| 20 class SurfaceDisplayOutputSurface : public cc::OutputSurface { | 20 class SurfaceDisplayOutputSurface : public cc::OutputSurface { |
| 21 public: | 21 public: |
| 22 // The underlying cc::Display and cc::SurfaceManager must outlive this class. | 22 // The underlying cc::Display and cc::SurfaceManager must outlive this class. |
| 23 SurfaceDisplayOutputSurface( | 23 SurfaceDisplayOutputSurface( |
| 24 cc::Display* display, | 24 cc::Display* display, |
| 25 cc::SurfaceManager* surface_manager, | 25 cc::SurfaceManager* surface_manager, |
| 26 const scoped_refptr<cc::ContextProvider>& context_provider, | 26 const scoped_refptr<cc::ContextProvider>& context_provider); |
| 27 scoped_ptr<cc::SoftwareOutputDevice> software_device); | |
| 28 virtual ~SurfaceDisplayOutputSurface(); | 27 virtual ~SurfaceDisplayOutputSurface(); |
| 29 | 28 |
| 30 // cc::OutputSurface implementation. | 29 // cc::OutputSurface implementation. |
| 31 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 30 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 cc::Display* display_; | 33 cc::Display* display_; |
| 35 cc::SurfaceManager* surface_manager_; | 34 cc::SurfaceManager* surface_manager_; |
| 36 | 35 |
| 37 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); | 36 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace content | 39 } // namespace content |
| 41 | 40 |
| 42 #endif // CONTENT_BROWSER_COMPOSITOR_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 41 #endif // CONTENT_BROWSER_COMPOSITOR_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| OLD | NEW |