| 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 CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 5 #ifndef CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| 6 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 6 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "cc/output/output_surface.h" | 8 #include "cc/output/output_surface.h" |
| 9 #include "cc/surfaces/surface_factory.h" | 9 #include "cc/surfaces/surface_factory.h" |
| 10 #include "cc/surfaces/surface_factory_client.h" | 10 #include "cc/surfaces/surface_factory_client.h" |
| 11 #include "cc/surfaces/surface_id_allocator.h" | 11 #include "cc/surfaces/surface_id_allocator.h" |
| 12 #include "cc/surfaces/surfaces_export.h" | 12 #include "cc/surfaces/surfaces_export.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class Display; | 15 class Display; |
| 16 class OnscreenDisplayClient; | 16 class OnscreenDisplayClient; |
| 17 class SurfaceManager; | 17 class SurfaceManager; |
| 18 | 18 |
| 19 // This class is maps a compositor OutputSurface to the surface system's Display | 19 // This class is maps a compositor OutputSurface to the surface system's Display |
| 20 // concept, allowing a compositor client to submit frames for a native root | 20 // concept, allowing a compositor client to submit frames for a native root |
| 21 // window or physical display. | 21 // window or physical display. |
| 22 class CC_SURFACES_EXPORT SurfaceDisplayOutputSurface | 22 class CC_SURFACES_EXPORT SurfaceDisplayOutputSurface |
| 23 : public OutputSurface, | 23 : public OutputSurface, |
| 24 public SurfaceFactoryClient { | 24 public SurfaceFactoryClient { |
| 25 public: | 25 public: |
| 26 // The underlying Display and SurfaceManager must outlive this class. | 26 // The underlying Display and SurfaceManager must outlive this class. |
| 27 SurfaceDisplayOutputSurface( | 27 SurfaceDisplayOutputSurface( |
| 28 SurfaceManager* surface_manager, | 28 SurfaceManager* surface_manager, |
| 29 SurfaceIdAllocator* allocator, | 29 SurfaceIdAllocator* allocator, |
| 30 const scoped_refptr<ContextProvider>& context_provider); | 30 const scoped_refptr<ContextProvider>& context_provider, |
| 31 const scoped_refptr<ContextProvider>& worker_context_provider); |
| 31 ~SurfaceDisplayOutputSurface() override; | 32 ~SurfaceDisplayOutputSurface() override; |
| 32 | 33 |
| 33 void set_display_client(OnscreenDisplayClient* display_client) { | 34 void set_display_client(OnscreenDisplayClient* display_client) { |
| 34 display_client_ = display_client; | 35 display_client_ = display_client; |
| 35 } | 36 } |
| 36 SurfaceFactory* factory() { return &factory_; } | 37 SurfaceFactory* factory() { return &factory_; } |
| 37 void ReceivedVSyncParameters(base::TimeTicks timebase, | 38 void ReceivedVSyncParameters(base::TimeTicks timebase, |
| 38 base::TimeDelta interval); | 39 base::TimeDelta interval); |
| 39 | 40 |
| 40 // OutputSurface implementation. | 41 // OutputSurface implementation. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 53 gfx::Size display_size_; | 54 gfx::Size display_size_; |
| 54 SurfaceId surface_id_; | 55 SurfaceId surface_id_; |
| 55 SurfaceIdAllocator* allocator_; | 56 SurfaceIdAllocator* allocator_; |
| 56 | 57 |
| 57 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); | 58 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 } // namespace cc | 61 } // namespace cc |
| 61 | 62 |
| 62 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 63 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| OLD | NEW |