| 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_H_ | 5 #ifndef CC_SURFACES_SURFACE_H_ |
| 6 #define CC_SURFACES_SURFACE_H_ | 6 #define CC_SURFACES_SURFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class CompositorFrame; | 35 class CompositorFrame; |
| 36 class CopyOutputRequest; | 36 class CopyOutputRequest; |
| 37 class SurfaceManager; | 37 class SurfaceManager; |
| 38 class SurfaceFactory; | 38 class SurfaceFactory; |
| 39 class SurfaceResourceHolder; | 39 class SurfaceResourceHolder; |
| 40 | 40 |
| 41 class CC_SURFACES_EXPORT Surface { | 41 class CC_SURFACES_EXPORT Surface { |
| 42 public: | 42 public: |
| 43 using DrawCallback = SurfaceFactory::DrawCallback; | 43 using DrawCallback = SurfaceFactory::DrawCallback; |
| 44 | 44 |
| 45 Surface(const SurfaceId& id, SurfaceFactory* factory); | 45 Surface(const SurfaceId& id, base::WeakPtr<SurfaceFactory> factory); |
| 46 ~Surface(); | 46 ~Surface(); |
| 47 | 47 |
| 48 const SurfaceId& surface_id() const { return surface_id_; } | 48 const SurfaceId& surface_id() const { return surface_id_; } |
| 49 const SurfaceId& previous_frame_surface_id() const { | 49 const SurfaceId& previous_frame_surface_id() const { |
| 50 return previous_frame_surface_id_; | 50 return previous_frame_surface_id_; |
| 51 } | 51 } |
| 52 | 52 |
| 53 void SetPreviousFrameSurface(Surface* surface); | 53 void SetPreviousFrameSurface(Surface* surface); |
| 54 | 54 |
| 55 void QueueFrame(CompositorFrame frame, const DrawCallback& draw_callback); | 55 void QueueFrame(CompositorFrame frame, const DrawCallback& draw_callback); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 std::vector<SurfaceId> referenced_surfaces_; | 114 std::vector<SurfaceId> referenced_surfaces_; |
| 115 | 115 |
| 116 DrawCallback draw_callback_; | 116 DrawCallback draw_callback_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(Surface); | 118 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace cc | 121 } // namespace cc |
| 122 | 122 |
| 123 #endif // CC_SURFACES_SURFACE_H_ | 123 #endif // CC_SURFACES_SURFACE_H_ |
| OLD | NEW |