| 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/layers/tiled_layer_impl.h" | 5 #include "cc/layers/tiled_layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/layers/append_quads_data.h" | 7 #include "cc/layers/append_quads_data.h" |
| 8 #include "cc/quads/tile_draw_quad.h" | 8 #include "cc/quads/tile_draw_quad.h" |
| 9 #include "cc/resources/layer_tiling_data.h" | 9 #include "cc/resources/layer_tiling_data.h" |
| 10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 AppendQuadsData data; | 103 AppendQuadsData data; |
| 104 layer->AppendQuads(&quad_culler, &data); | 104 layer->AppendQuads(&quad_culler, &data); |
| 105 EXPECT_EQ(quad_culler.quad_list().size(), 0u); | 105 EXPECT_EQ(quad_culler.quad_list().size(), 0u); |
| 106 } | 106 } |
| 107 | 107 |
| 108 // Layer with non-intersecting visible layer rect produces no quads | 108 // Layer with non-intersecting visible layer rect produces no quads |
| 109 { | 109 { |
| 110 scoped_ptr<TiledLayerImpl> layer = | 110 scoped_ptr<TiledLayerImpl> layer = |
| 111 CreateLayer(tile_size, layer_size, LayerTilingData::NO_BORDER_TEXELS); | 111 CreateLayer(tile_size, layer_size, LayerTilingData::NO_BORDER_TEXELS); |
| 112 | 112 |
| 113 gfx::Rect outsideBounds(gfx::Point(-100, -100), gfx::Size(50, 50)); | 113 gfx::Rect outside_bounds(gfx::Point(-100, -100), gfx::Size(50, 50)); |
| 114 layer->draw_properties().visible_content_rect = outsideBounds; | 114 layer->draw_properties().visible_content_rect = outside_bounds; |
| 115 | 115 |
| 116 MockQuadCuller quad_culler; | 116 MockQuadCuller quad_culler; |
| 117 AppendQuadsData data; | 117 AppendQuadsData data; |
| 118 layer->AppendQuads(&quad_culler, &data); | 118 layer->AppendQuads(&quad_culler, &data); |
| 119 EXPECT_EQ(quad_culler.quad_list().size(), 0u); | 119 EXPECT_EQ(quad_culler.quad_list().size(), 0u); |
| 120 } | 120 } |
| 121 | 121 |
| 122 // Layer with skips draw produces no quads | 122 // Layer with skips draw produces no quads |
| 123 { | 123 { |
| 124 scoped_ptr<TiledLayerImpl> layer = | 124 scoped_ptr<TiledLayerImpl> layer = |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 << LayerTestCommon::quad_string << i; | 256 << LayerTestCommon::quad_string << i; |
| 257 EXPECT_EQ(tile_size, quad->texture_size) << LayerTestCommon::quad_string | 257 EXPECT_EQ(tile_size, quad->texture_size) << LayerTestCommon::quad_string |
| 258 << i; | 258 << i; |
| 259 EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaque_rect) | 259 EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaque_rect) |
| 260 << LayerTestCommon::quad_string << i; | 260 << LayerTestCommon::quad_string << i; |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace | 264 } // namespace |
| 265 } // namespace cc | 265 } // namespace cc |
| OLD | NEW |