| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/texture_layer_impl.h" | 5 #include "cc/layers/texture_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/output/compositor_frame_sink.h" | 9 #include "cc/output/compositor_frame_sink.h" |
| 10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); | 93 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); |
| 94 EXPECT_EQ(impl.quad_list().size(), 0u); | 94 EXPECT_EQ(impl.quad_list().size(), 0u); |
| 95 } | 95 } |
| 96 | 96 |
| 97 { | 97 { |
| 98 SCOPED_TRACE("Partial occlusion"); | 98 SCOPED_TRACE("Partial occlusion"); |
| 99 gfx::Rect occluded(200, 0, 800, 1000); | 99 gfx::Rect occluded(200, 0, 800, 1000); |
| 100 impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded); | 100 impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded); |
| 101 | 101 |
| 102 size_t partially_occluded_count = 0; | 102 size_t partially_occluded_count = 0; |
| 103 LayerTestCommon::VerifyQuadsAreOccluded( | 103 LayerTestCommon::VerifyQuadsAreOccluded(impl.quad_list(), occluded, false, |
| 104 impl.quad_list(), occluded, &partially_occluded_count); | 104 &partially_occluded_count); |
| 105 // The layer outputs one quad, which is partially occluded. | 105 // The layer outputs one quad, which is partially occluded. |
| 106 EXPECT_EQ(1u, impl.quad_list().size()); | 106 EXPECT_EQ(1u, impl.quad_list().size()); |
| 107 EXPECT_EQ(1u, partially_occluded_count); | 107 EXPECT_EQ(1u, partially_occluded_count); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 TEST(TextureLayerImplTest, OutputIsSecure) { | 111 TEST(TextureLayerImplTest, OutputIsSecure) { |
| 112 gfx::Size layer_size(1000, 1000); | 112 gfx::Size layer_size(1000, 1000); |
| 113 gfx::Size viewport_size(1000, 1000); | 113 gfx::Size viewport_size(1000, 1000); |
| 114 | 114 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // Toggling the gpu rasterization clears all tilings on both trees. | 187 // Toggling the gpu rasterization clears all tilings on both trees. |
| 188 impl.host_impl()->SetHasGpuRasterizationTrigger(true); | 188 impl.host_impl()->SetHasGpuRasterizationTrigger(true); |
| 189 impl.host_impl()->SetContentIsSuitableForGpuRasterization(true); | 189 impl.host_impl()->SetContentIsSuitableForGpuRasterization(true); |
| 190 impl.host_impl()->CommitComplete(); | 190 impl.host_impl()->CommitComplete(); |
| 191 EXPECT_TRUE(impl.host_impl()->use_gpu_rasterization()); | 191 EXPECT_TRUE(impl.host_impl()->use_gpu_rasterization()); |
| 192 EXPECT_FALSE(released); | 192 EXPECT_FALSE(released); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace | 195 } // namespace |
| 196 } // namespace cc | 196 } // namespace cc |
| OLD | NEW |