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_FACTORY_H_ | 5 #ifndef CC_SURFACES_SURFACE_FACTORY_H_ |
6 #define CC_SURFACES_SURFACE_FACTORY_H_ | 6 #define CC_SURFACES_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void ClearSurface(); | 66 void ClearSurface(); |
67 | 67 |
68 void WillDrawSurface(const LocalSurfaceId& id, const gfx::Rect& damage_rect); | 68 void WillDrawSurface(const LocalSurfaceId& id, const gfx::Rect& damage_rect); |
69 | 69 |
70 SurfaceFactoryClient* client() { return client_; } | 70 SurfaceFactoryClient* client() { return client_; } |
71 | 71 |
72 void ReceiveFromChild(const TransferableResourceArray& resources); | 72 void ReceiveFromChild(const TransferableResourceArray& resources); |
73 void RefResources(const TransferableResourceArray& resources); | 73 void RefResources(const TransferableResourceArray& resources); |
74 void UnrefResources(const ReturnedResourceArray& resources); | 74 void UnrefResources(const ReturnedResourceArray& resources); |
75 | 75 |
| 76 void RunDrawCallbacks(); |
| 77 |
76 SurfaceManager* manager() { return manager_; } | 78 SurfaceManager* manager() { return manager_; } |
77 | 79 |
78 Surface* current_surface_for_testing() { return current_surface_.get(); } | 80 Surface* current_surface_for_testing() { return current_surface_.get(); } |
79 | 81 |
80 // This can be set to false if resources from this SurfaceFactory don't need | 82 // This can be set to false if resources from this SurfaceFactory don't need |
81 // to have sync points set on them when returned from the Display, for | 83 // to have sync points set on them when returned from the Display, for |
82 // example if the Display shares a context with the creator. | 84 // example if the Display shares a context with the creator. |
83 bool needs_sync_points() const { return needs_sync_points_; } | 85 bool needs_sync_points() const { return needs_sync_points_; } |
84 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } | 86 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } |
85 | 87 |
(...skipping 21 matching lines...) Expand all Loading... |
107 bool seen_first_frame_activation_ = false; | 109 bool seen_first_frame_activation_ = false; |
108 std::unique_ptr<Surface> current_surface_; | 110 std::unique_ptr<Surface> current_surface_; |
109 base::WeakPtrFactory<SurfaceFactory> weak_factory_; | 111 base::WeakPtrFactory<SurfaceFactory> weak_factory_; |
110 | 112 |
111 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); | 113 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); |
112 }; | 114 }; |
113 | 115 |
114 } // namespace cc | 116 } // namespace cc |
115 | 117 |
116 #endif // CC_SURFACES_SURFACE_FACTORY_H_ | 118 #endif // CC_SURFACES_SURFACE_FACTORY_H_ |
OLD | NEW |