| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 SurfaceManager* manager() { return manager_; } | 80 SurfaceManager* manager() { return manager_; } |
| 81 | 81 |
| 82 Surface* current_surface_for_testing() { return current_surface_.get(); } | 82 Surface* current_surface_for_testing() { return current_surface_.get(); } |
| 83 | 83 |
| 84 // This can be set to false if resources from this SurfaceFactory don't need | 84 // This can be set to false if resources from this SurfaceFactory don't need |
| 85 // to have sync points set on them when returned from the Display, for | 85 // to have sync points set on them when returned from the Display, for |
| 86 // example if the Display shares a context with the creator. | 86 // example if the Display shares a context with the creator. |
| 87 bool needs_sync_points() const { return needs_sync_points_; } | 87 bool needs_sync_points() const { return needs_sync_points_; } |
| 88 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } | 88 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } |
| 89 | 89 |
| 90 void OnBadFrameReceived(); |
| 91 |
| 90 private: | 92 private: |
| 91 // PendingFrameObserver implementation. | 93 // PendingFrameObserver implementation. |
| 92 void OnReferencedSurfacesChanged( | 94 void OnReferencedSurfacesChanged( |
| 93 Surface* surface, | 95 Surface* surface, |
| 94 const std::vector<SurfaceId>* active_referenced_surfaces, | 96 const std::vector<SurfaceId>* active_referenced_surfaces, |
| 95 const std::vector<SurfaceId>* pending_referenced_surfaces) override; | 97 const std::vector<SurfaceId>* pending_referenced_surfaces) override; |
| 96 void OnSurfaceActivated(Surface* surface) override; | 98 void OnSurfaceActivated(Surface* surface) override; |
| 97 void OnSurfaceDependenciesChanged( | 99 void OnSurfaceDependenciesChanged( |
| 98 Surface* surface, | 100 Surface* surface, |
| 99 const SurfaceDependencies& added_dependencies, | 101 const SurfaceDependencies& added_dependencies, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 111 bool seen_first_frame_activation_ = false; | 113 bool seen_first_frame_activation_ = false; |
| 112 std::unique_ptr<Surface> current_surface_; | 114 std::unique_ptr<Surface> current_surface_; |
| 113 base::WeakPtrFactory<SurfaceFactory> weak_factory_; | 115 base::WeakPtrFactory<SurfaceFactory> weak_factory_; |
| 114 | 116 |
| 115 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); | 117 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); |
| 116 }; | 118 }; |
| 117 | 119 |
| 118 } // namespace cc | 120 } // namespace cc |
| 119 | 121 |
| 120 #endif // CC_SURFACES_SURFACE_FACTORY_H_ | 122 #endif // CC_SURFACES_SURFACE_FACTORY_H_ |
| OLD | NEW |