| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "cc/layers/append_quads_data.h" | 7 #include "cc/layers/append_quads_data.h" |
| 8 #include "cc/layers/ui_resource_layer_impl.h" | 8 #include "cc/layers/ui_resource_layer_impl.h" |
| 9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
| 10 #include "cc/resources/ui_resource_bitmap.h" | 10 #include "cc/resources/ui_resource_bitmap.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); | 210 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); |
| 211 EXPECT_EQ(impl.quad_list().size(), 0u); | 211 EXPECT_EQ(impl.quad_list().size(), 0u); |
| 212 } | 212 } |
| 213 | 213 |
| 214 { | 214 { |
| 215 SCOPED_TRACE("Partial occlusion"); | 215 SCOPED_TRACE("Partial occlusion"); |
| 216 gfx::Rect occluded(200, 0, 800, 1000); | 216 gfx::Rect occluded(200, 0, 800, 1000); |
| 217 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded); | 217 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded); |
| 218 | 218 |
| 219 size_t partially_occluded_count = 0; | 219 size_t partially_occluded_count = 0; |
| 220 LayerTestCommon::VerifyQuadsAreOccluded( | 220 LayerTestCommon::VerifyQuadsAreOccluded(impl.quad_list(), occluded, false, |
| 221 impl.quad_list(), occluded, &partially_occluded_count); | 221 &partially_occluded_count); |
| 222 // The layer outputs one quad, which is partially occluded. | 222 // The layer outputs one quad, which is partially occluded. |
| 223 EXPECT_EQ(1u, impl.quad_list().size()); | 223 EXPECT_EQ(1u, impl.quad_list().size()); |
| 224 EXPECT_EQ(1u, partially_occluded_count); | 224 EXPECT_EQ(1u, partially_occluded_count); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace | 228 } // namespace |
| 229 } // namespace cc | 229 } // namespace cc |
| OLD | NEW |