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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void SetPreviousFrameSurface(Surface* surface); | 53 void SetPreviousFrameSurface(Surface* surface); |
54 | 54 |
55 // |draw_callback| is called once to notify the client that the previously | 55 // |draw_callback| is called once to notify the client that the previously |
56 // submitted CompositorFrame is processed and that another frame can be | 56 // submitted CompositorFrame is processed and that another frame can be |
57 // submitted. | 57 // submitted. |
58 // |will_draw_callback| is called when |surface| is scheduled for a draw and | 58 // |will_draw_callback| is called when |surface| is scheduled for a draw and |
59 // there is visible damage. | 59 // there is visible damage. |
60 void QueueFrame(CompositorFrame frame, | 60 void QueueFrame(CompositorFrame frame, |
61 const DrawCallback& draw_callback, | 61 const DrawCallback& draw_callback, |
62 const WillDrawCallback& will_draw_callback); | 62 const WillDrawCallback& will_draw_callback); |
63 void EvictFrame(); | |
64 void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request); | 63 void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request); |
65 | 64 |
66 // Notifies the Surface that a blocking SurfaceId now has an active frame. | 65 // Notifies the Surface that a blocking SurfaceId now has an active frame. |
67 void NotifySurfaceIdAvailable(const SurfaceId& surface_id); | 66 void NotifySurfaceIdAvailable(const SurfaceId& surface_id); |
68 | 67 |
69 void AddObserver(PendingFrameObserver* observer); | 68 void AddObserver(PendingFrameObserver* observer); |
70 void RemoveObserver(PendingFrameObserver* observer); | 69 void RemoveObserver(PendingFrameObserver* observer); |
71 | 70 |
72 // Called if a deadline has been hit and this surface is not yet active but | 71 // Called if a deadline has been hit and this surface is not yet active but |
73 // it's marked as respecting deadlines. | 72 // it's marked as respecting deadlines. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 165 |
167 SurfaceDependencies blocking_surfaces_; | 166 SurfaceDependencies blocking_surfaces_; |
168 base::ObserverList<PendingFrameObserver, true> observers_; | 167 base::ObserverList<PendingFrameObserver, true> observers_; |
169 | 168 |
170 DISALLOW_COPY_AND_ASSIGN(Surface); | 169 DISALLOW_COPY_AND_ASSIGN(Surface); |
171 }; | 170 }; |
172 | 171 |
173 } // namespace cc | 172 } // namespace cc |
174 | 173 |
175 #endif // CC_SURFACES_SURFACE_H_ | 174 #endif // CC_SURFACES_SURFACE_H_ |
OLD | NEW |