OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_QUADS_RENDER_PASS_H_ | 5 #ifndef CC_QUADS_RENDER_PASS_H_ |
6 #define CC_QUADS_RENDER_PASS_H_ | 6 #define CC_QUADS_RENDER_PASS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 static std::unique_ptr<RenderPass> Create(); | 62 static std::unique_ptr<RenderPass> Create(); |
63 static std::unique_ptr<RenderPass> Create(size_t num_layers); | 63 static std::unique_ptr<RenderPass> Create(size_t num_layers); |
64 static std::unique_ptr<RenderPass> Create(size_t shared_quad_state_list_size, | 64 static std::unique_ptr<RenderPass> Create(size_t shared_quad_state_list_size, |
65 size_t quad_list_size); | 65 size_t quad_list_size); |
66 | 66 |
67 // A shallow copy of the render pass, which does not include its quads or copy | 67 // A shallow copy of the render pass, which does not include its quads or copy |
68 // requests. | 68 // requests. |
69 std::unique_ptr<RenderPass> Copy(RenderPassId new_id) const; | 69 std::unique_ptr<RenderPass> Copy(RenderPassId new_id) const; |
70 | 70 |
| 71 // A deep copy of the render pass that includes quads. |
| 72 std::unique_ptr<RenderPass> DeepCopy() const; |
| 73 |
71 // A deep copy of the render passes in the list including the quads. | 74 // A deep copy of the render passes in the list including the quads. |
72 static void CopyAll(const std::vector<std::unique_ptr<RenderPass>>& in, | 75 static void CopyAll(const std::vector<std::unique_ptr<RenderPass>>& in, |
73 std::vector<std::unique_ptr<RenderPass>>* out); | 76 std::vector<std::unique_ptr<RenderPass>>* out); |
74 | 77 |
75 void SetNew(RenderPassId id, | 78 void SetNew(RenderPassId id, |
76 const gfx::Rect& output_rect, | 79 const gfx::Rect& output_rect, |
77 const gfx::Rect& damage_rect, | 80 const gfx::Rect& damage_rect, |
78 const gfx::Transform& transform_to_root_target); | 81 const gfx::Transform& transform_to_root_target); |
79 | 82 |
80 void SetAll(RenderPassId id, | 83 void SetAll(RenderPassId id, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 DISALLOW_COPY_AND_ASSIGN(RenderPass); | 139 DISALLOW_COPY_AND_ASSIGN(RenderPass); |
137 }; | 140 }; |
138 | 141 |
139 using RenderPassList = std::vector<std::unique_ptr<RenderPass>>; | 142 using RenderPassList = std::vector<std::unique_ptr<RenderPass>>; |
140 using RenderPassIdHashMap = | 143 using RenderPassIdHashMap = |
141 std::unordered_map<RenderPassId, RenderPass*, RenderPassIdHash>; | 144 std::unordered_map<RenderPassId, RenderPass*, RenderPassIdHash>; |
142 | 145 |
143 } // namespace cc | 146 } // namespace cc |
144 | 147 |
145 #endif // CC_QUADS_RENDER_PASS_H_ | 148 #endif // CC_QUADS_RENDER_PASS_H_ |
OLD | NEW |