OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "cc/test/layer_test_common.h" | 5 #include "cc/test/layer_test_common.h" |
6 | 6 |
7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 render_pass_->quad_list.clear(); | 127 render_pass_->quad_list.clear(); |
128 render_pass_->shared_quad_state_list.clear(); | 128 render_pass_->shared_quad_state_list.clear(); |
129 occlusion_tracker_.set_occluded_target_rect(occluded); | 129 occlusion_tracker_.set_occluded_target_rect(occluded); |
130 layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); | 130 layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); |
131 layer_impl->AppendQuads(render_pass_.get(), occlusion_tracker_, &data); | 131 layer_impl->AppendQuads(render_pass_.get(), occlusion_tracker_, &data); |
132 layer_impl->DidDraw(resource_provider()); | 132 layer_impl->DidDraw(resource_provider()); |
133 } | 133 } |
134 | 134 |
135 void LayerTestCommon::LayerImplTest::AppendQuadsForPassWithOcclusion( | 135 void LayerTestCommon::LayerImplTest::AppendQuadsForPassWithOcclusion( |
136 LayerImpl* layer_impl, | 136 LayerImpl* layer_impl, |
137 const RenderPass::Id& id, | 137 const RenderPassId& id, |
138 const gfx::Rect& occluded) { | 138 const gfx::Rect& occluded) { |
139 AppendQuadsData data(id); | 139 AppendQuadsData data(id); |
140 | 140 |
141 render_pass_->quad_list.clear(); | 141 render_pass_->quad_list.clear(); |
142 render_pass_->shared_quad_state_list.clear(); | 142 render_pass_->shared_quad_state_list.clear(); |
143 occlusion_tracker_.set_occluded_target_rect(occluded); | 143 occlusion_tracker_.set_occluded_target_rect(occluded); |
144 layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); | 144 layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); |
145 layer_impl->AppendQuads(render_pass_.get(), occlusion_tracker_, &data); | 145 layer_impl->AppendQuads(render_pass_.get(), occlusion_tracker_, &data); |
146 layer_impl->DidDraw(resource_provider()); | 146 layer_impl->DidDraw(resource_provider()); |
147 } | 147 } |
148 | 148 |
149 void LayerTestCommon::LayerImplTest::AppendSurfaceQuadsWithOcclusion( | 149 void LayerTestCommon::LayerImplTest::AppendSurfaceQuadsWithOcclusion( |
150 RenderSurfaceImpl* surface_impl, | 150 RenderSurfaceImpl* surface_impl, |
151 const gfx::Rect& occluded) { | 151 const gfx::Rect& occluded) { |
152 AppendQuadsData data; | 152 AppendQuadsData data; |
153 | 153 |
154 render_pass_->quad_list.clear(); | 154 render_pass_->quad_list.clear(); |
155 render_pass_->shared_quad_state_list.clear(); | 155 render_pass_->shared_quad_state_list.clear(); |
156 occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( | 156 occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( |
157 occluded); | 157 occluded); |
158 bool for_replica = false; | 158 bool for_replica = false; |
159 RenderPass::Id id(1, 1); | 159 RenderPassId id(1, 1); |
160 surface_impl->AppendQuads( | 160 surface_impl->AppendQuads( |
161 render_pass_.get(), occlusion_tracker_, &data, for_replica, id); | 161 render_pass_.get(), occlusion_tracker_, &data, for_replica, id); |
162 } | 162 } |
163 | 163 |
164 } // namespace cc | 164 } // namespace cc |
OLD | NEW |