OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/append_quads_data.h" | 5 #include "cc/layers/append_quads_data.h" |
6 #include "cc/layers/ui_resource_layer_impl.h" | 6 #include "cc/layers/ui_resource_layer_impl.h" |
7 #include "cc/quads/draw_quad.h" | 7 #include "cc/quads/draw_quad.h" |
8 #include "cc/resources/ui_resource_bitmap.h" | 8 #include "cc/resources/ui_resource_bitmap.h" |
9 #include "cc/resources/ui_resource_client.h" | 9 #include "cc/resources/ui_resource_client.h" |
10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); | 188 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); |
189 EXPECT_EQ(impl.quad_list().size(), 0u); | 189 EXPECT_EQ(impl.quad_list().size(), 0u); |
190 } | 190 } |
191 | 191 |
192 { | 192 { |
193 SCOPED_TRACE("Partial occlusion"); | 193 SCOPED_TRACE("Partial occlusion"); |
194 gfx::Rect occluded(200, 0, 800, 1000); | 194 gfx::Rect occluded(200, 0, 800, 1000); |
195 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded); | 195 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded); |
196 | 196 |
197 size_t partially_occluded_count = 0; | 197 size_t partially_occluded_count = 0; |
198 LayerTestCommon::VerifyQuadsCoverRectWithOcclusion( | 198 LayerTestCommon::VerifyQuadsAreOccluded( |
199 impl.quad_list(), | 199 impl.quad_list(), occluded, &partially_occluded_count); |
200 gfx::Rect(layer_size), | |
201 occluded, | |
202 &partially_occluded_count); | |
203 // The layer outputs one quad, which is partially occluded. | 200 // The layer outputs one quad, which is partially occluded. |
204 EXPECT_EQ(1u, impl.quad_list().size()); | 201 EXPECT_EQ(1u, impl.quad_list().size()); |
205 EXPECT_EQ(1u, partially_occluded_count); | 202 EXPECT_EQ(1u, partially_occluded_count); |
206 } | 203 } |
207 } | 204 } |
208 | 205 |
209 } // namespace | 206 } // namespace |
210 } // namespace cc | 207 } // namespace cc |
OLD | NEW |