| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 ~Surface(); | 45 ~Surface(); |
| 46 | 46 |
| 47 const SurfaceId& surface_id() const { return surface_id_; } | 47 const SurfaceId& surface_id() const { return surface_id_; } |
| 48 const SurfaceId& previous_frame_surface_id() const { | 48 const SurfaceId& previous_frame_surface_id() const { |
| 49 return previous_frame_surface_id_; | 49 return previous_frame_surface_id_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void SetPreviousFrameSurface(Surface* surface); | 52 void SetPreviousFrameSurface(Surface* surface); |
| 53 | 53 |
| 54 void QueueFrame(CompositorFrame frame, const DrawCallback& draw_callback); | 54 void QueueFrame(CompositorFrame frame, const DrawCallback& draw_callback); |
| 55 void EvictFrame(); |
| 55 void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request); | 56 void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request); |
| 56 // Adds each CopyOutputRequest in the current frame to copy_requests. The | 57 // Adds each CopyOutputRequest in the current frame to copy_requests. The |
| 57 // caller takes ownership of them. |copy_requests| is keyed by RenderPass ids. | 58 // caller takes ownership of them. |copy_requests| is keyed by RenderPass ids. |
| 58 void TakeCopyOutputRequests( | 59 void TakeCopyOutputRequests( |
| 59 std::multimap<int, std::unique_ptr<CopyOutputRequest>>* copy_requests); | 60 std::multimap<int, std::unique_ptr<CopyOutputRequest>>* copy_requests); |
| 60 | 61 |
| 61 // Returns the most recent frame that is eligible to be rendered. | 62 // Returns the most recent frame that is eligible to be rendered. |
| 62 // You must check whether HasFrame() returns true before calling this method. | 63 // You must check whether HasFrame() returns true before calling this method. |
| 63 const CompositorFrame& GetEligibleFrame(); | 64 const CompositorFrame& GetEligibleFrame(); |
| 64 | 65 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 std::vector<SurfaceId> referenced_surfaces_; | 113 std::vector<SurfaceId> referenced_surfaces_; |
| 113 | 114 |
| 114 DrawCallback draw_callback_; | 115 DrawCallback draw_callback_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(Surface); | 117 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 } // namespace cc | 120 } // namespace cc |
| 120 | 121 |
| 121 #endif // CC_SURFACES_SURFACE_H_ | 122 #endif // CC_SURFACES_SURFACE_H_ |
| OLD | NEW |