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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 ScopedPtrVector<RenderPass>* out); | 67 ScopedPtrVector<RenderPass>* out); |
68 | 68 |
69 void SetNew(RenderPassId id, | 69 void SetNew(RenderPassId id, |
70 const gfx::Rect& output_rect, | 70 const gfx::Rect& output_rect, |
71 const gfx::Rect& damage_rect, | 71 const gfx::Rect& damage_rect, |
72 const gfx::Transform& transform_to_root_target); | 72 const gfx::Transform& transform_to_root_target); |
73 | 73 |
74 void SetAll(RenderPassId id, | 74 void SetAll(RenderPassId id, |
75 const gfx::Rect& output_rect, | 75 const gfx::Rect& output_rect, |
76 const gfx::Rect& damage_rect, | 76 const gfx::Rect& damage_rect, |
| 77 const gfx::Rect& overlay_rect, |
77 const gfx::Transform& transform_to_root_target, | 78 const gfx::Transform& transform_to_root_target, |
78 bool has_transparent_background); | 79 bool has_transparent_background); |
79 | 80 |
80 void AsValueInto(base::trace_event::TracedValue* dict) const; | 81 void AsValueInto(base::trace_event::TracedValue* dict) const; |
81 | 82 |
82 SharedQuadState* CreateAndAppendSharedQuadState(); | 83 SharedQuadState* CreateAndAppendSharedQuadState(); |
83 | 84 |
84 template <typename DrawQuadType> | 85 template <typename DrawQuadType> |
85 DrawQuadType* CreateAndAppendDrawQuad() { | 86 DrawQuadType* CreateAndAppendDrawQuad() { |
86 return quad_list.AllocateAndConstruct<DrawQuadType>(); | 87 return quad_list.AllocateAndConstruct<DrawQuadType>(); |
87 } | 88 } |
88 | 89 |
89 RenderPassDrawQuad* CopyFromAndAppendRenderPassDrawQuad( | 90 RenderPassDrawQuad* CopyFromAndAppendRenderPassDrawQuad( |
90 const RenderPassDrawQuad* quad, | 91 const RenderPassDrawQuad* quad, |
91 const SharedQuadState* shared_quad_state, | 92 const SharedQuadState* shared_quad_state, |
92 RenderPassId render_pass_id); | 93 RenderPassId render_pass_id); |
93 DrawQuad* CopyFromAndAppendDrawQuad(const DrawQuad* quad, | 94 DrawQuad* CopyFromAndAppendDrawQuad(const DrawQuad* quad, |
94 const SharedQuadState* shared_quad_state); | 95 const SharedQuadState* shared_quad_state); |
95 | 96 |
| 97 gfx::Rect GetFullDamageRect(); |
| 98 |
96 // Uniquely identifies the render pass in the compositor's current frame. | 99 // Uniquely identifies the render pass in the compositor's current frame. |
97 RenderPassId id; | 100 RenderPassId id; |
98 | 101 |
99 // These are in the space of the render pass' physical pixels. | 102 // These are in the space of the render pass' physical pixels. |
100 gfx::Rect output_rect; | 103 gfx::Rect output_rect; |
101 gfx::Rect damage_rect; | 104 gfx::Rect damage_rect; |
| 105 gfx::Rect overlay_rect; |
102 | 106 |
103 // Transforms from the origin of the |output_rect| to the origin of the root | 107 // Transforms from the origin of the |output_rect| to the origin of the root |
104 // render pass' |output_rect|. | 108 // render pass' |output_rect|. |
105 gfx::Transform transform_to_root_target; | 109 gfx::Transform transform_to_root_target; |
106 | 110 |
107 // If false, the pixels in the render pass' texture are all opaque. | 111 // If false, the pixels in the render pass' texture are all opaque. |
108 bool has_transparent_background; | 112 bool has_transparent_background; |
109 | 113 |
110 // If non-empty, the renderer should produce a copy of the render pass' | 114 // If non-empty, the renderer should produce a copy of the render pass' |
111 // contents as a bitmap, and give a copy of the bitmap to each callback in | 115 // contents as a bitmap, and give a copy of the bitmap to each callback in |
(...skipping 28 matching lines...) Expand all Loading... |
140 } | 144 } |
141 }; | 145 }; |
142 } // namespace BASE_HASH_NAMESPACE | 146 } // namespace BASE_HASH_NAMESPACE |
143 | 147 |
144 namespace cc { | 148 namespace cc { |
145 typedef ScopedPtrVector<RenderPass> RenderPassList; | 149 typedef ScopedPtrVector<RenderPass> RenderPassList; |
146 typedef base::hash_map<RenderPassId, RenderPass*> RenderPassIdHashMap; | 150 typedef base::hash_map<RenderPassId, RenderPass*> RenderPassIdHashMap; |
147 } // namespace cc | 151 } // namespace cc |
148 | 152 |
149 #endif // CC_QUADS_RENDER_PASS_H_ | 153 #endif // CC_QUADS_RENDER_PASS_H_ |
OLD | NEW |