| 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 <utility> | 10 #include <utility> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const gfx::Rect& damage_rect, | 78 const gfx::Rect& damage_rect, |
| 79 const gfx::Transform& transform_to_root_target); | 79 const gfx::Transform& transform_to_root_target); |
| 80 | 80 |
| 81 void SetAll(int id, | 81 void SetAll(int id, |
| 82 const gfx::Rect& output_rect, | 82 const gfx::Rect& output_rect, |
| 83 const gfx::Rect& damage_rect, | 83 const gfx::Rect& damage_rect, |
| 84 const gfx::Transform& transform_to_root_target, | 84 const gfx::Transform& transform_to_root_target, |
| 85 const FilterOperations& filters, | 85 const FilterOperations& filters, |
| 86 const FilterOperations& background_filters, | 86 const FilterOperations& background_filters, |
| 87 const gfx::ColorSpace& color_space, | 87 const gfx::ColorSpace& color_space, |
| 88 bool has_transparent_background); | 88 bool has_transparent_background, |
| 89 bool force_render_surface); |
| 89 | 90 |
| 90 void AsValueInto(base::trace_event::TracedValue* dict) const; | 91 void AsValueInto(base::trace_event::TracedValue* dict) const; |
| 91 | 92 |
| 92 SharedQuadState* CreateAndAppendSharedQuadState(); | 93 SharedQuadState* CreateAndAppendSharedQuadState(); |
| 93 | 94 |
| 94 template <typename DrawQuadType> | 95 template <typename DrawQuadType> |
| 95 DrawQuadType* CreateAndAppendDrawQuad() { | 96 DrawQuadType* CreateAndAppendDrawQuad() { |
| 96 return quad_list.AllocateAndConstruct<DrawQuadType>(); | 97 return quad_list.AllocateAndConstruct<DrawQuadType>(); |
| 97 } | 98 } |
| 98 | 99 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 120 // Post-processing filters, applied to the pixels showing through the | 121 // Post-processing filters, applied to the pixels showing through the |
| 121 // background of the render pass, from behind it. | 122 // background of the render pass, from behind it. |
| 122 FilterOperations background_filters; | 123 FilterOperations background_filters; |
| 123 | 124 |
| 124 // The color space into which content will be rendered for this render pass. | 125 // The color space into which content will be rendered for this render pass. |
| 125 gfx::ColorSpace color_space; | 126 gfx::ColorSpace color_space; |
| 126 | 127 |
| 127 // If false, the pixels in the render pass' texture are all opaque. | 128 // If false, the pixels in the render pass' texture are all opaque. |
| 128 bool has_transparent_background = true; | 129 bool has_transparent_background = true; |
| 129 | 130 |
| 131 bool force_render_surface = false; |
| 132 |
| 130 // If non-empty, the renderer should produce a copy of the render pass' | 133 // If non-empty, the renderer should produce a copy of the render pass' |
| 131 // contents as a bitmap, and give a copy of the bitmap to each callback in | 134 // contents as a bitmap, and give a copy of the bitmap to each callback in |
| 132 // this list. This property should not be serialized between compositors, as | 135 // this list. This property should not be serialized between compositors, as |
| 133 // it only makes sense in the root compositor. | 136 // it only makes sense in the root compositor. |
| 134 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; | 137 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; |
| 135 | 138 |
| 136 QuadList quad_list; | 139 QuadList quad_list; |
| 137 SharedQuadStateList shared_quad_state_list; | 140 SharedQuadStateList shared_quad_state_list; |
| 138 | 141 |
| 139 protected: | 142 protected: |
| 140 explicit RenderPass(size_t num_layers); | 143 explicit RenderPass(size_t num_layers); |
| 141 RenderPass(); | 144 RenderPass(); |
| 142 RenderPass(size_t shared_quad_state_list_size, size_t quad_list_size); | 145 RenderPass(size_t shared_quad_state_list_size, size_t quad_list_size); |
| 143 | 146 |
| 144 private: | 147 private: |
| 145 template <typename DrawQuadType> | 148 template <typename DrawQuadType> |
| 146 DrawQuadType* CopyFromAndAppendTypedDrawQuad(const DrawQuad* quad) { | 149 DrawQuadType* CopyFromAndAppendTypedDrawQuad(const DrawQuad* quad) { |
| 147 return quad_list.AllocateAndCopyFrom(DrawQuadType::MaterialCast(quad)); | 150 return quad_list.AllocateAndCopyFrom(DrawQuadType::MaterialCast(quad)); |
| 148 } | 151 } |
| 149 | 152 |
| 150 DISALLOW_COPY_AND_ASSIGN(RenderPass); | 153 DISALLOW_COPY_AND_ASSIGN(RenderPass); |
| 151 }; | 154 }; |
| 152 | 155 |
| 153 using RenderPassList = std::vector<std::unique_ptr<RenderPass>>; | 156 using RenderPassList = std::vector<std::unique_ptr<RenderPass>>; |
| 154 | 157 |
| 155 } // namespace cc | 158 } // namespace cc |
| 156 | 159 |
| 157 #endif // CC_QUADS_RENDER_PASS_H_ | 160 #endif // CC_QUADS_RENDER_PASS_H_ |
| OLD | NEW |