| 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_task_runner_provider.h" | 10 #include "cc/test/fake_impl_task_runner_provider.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 FakeUIResourceLayerTreeHostImpl* host_impl, | 26 FakeUIResourceLayerTreeHostImpl* host_impl, |
| 27 const gfx::Size& bitmap_size, | 27 const gfx::Size& bitmap_size, |
| 28 const gfx::Size& layer_size, | 28 const gfx::Size& layer_size, |
| 29 bool opaque, | 29 bool opaque, |
| 30 UIResourceId uid) { | 30 UIResourceId uid) { |
| 31 gfx::Rect visible_layer_rect(layer_size); | 31 gfx::Rect visible_layer_rect(layer_size); |
| 32 scoped_ptr<UIResourceLayerImpl> layer = | 32 scoped_ptr<UIResourceLayerImpl> layer = |
| 33 UIResourceLayerImpl::Create(host_impl->active_tree(), 1); | 33 UIResourceLayerImpl::Create(host_impl->active_tree(), 1); |
| 34 layer->draw_properties().visible_layer_rect = visible_layer_rect; | 34 layer->draw_properties().visible_layer_rect = visible_layer_rect; |
| 35 layer->SetBounds(layer_size); | 35 layer->SetBounds(layer_size); |
| 36 layer->SetHasRenderSurface(true); | 36 layer->SetForceRenderSurface(true); |
| 37 layer->draw_properties().render_target = layer.get(); | 37 layer->draw_properties().render_target = layer.get(); |
| 38 | 38 |
| 39 UIResourceBitmap bitmap(bitmap_size, opaque); | 39 UIResourceBitmap bitmap(bitmap_size, opaque); |
| 40 | 40 |
| 41 host_impl->CreateUIResource(uid, bitmap); | 41 host_impl->CreateUIResource(uid, bitmap); |
| 42 layer->SetUIResourceId(uid); | 42 layer->SetUIResourceId(uid); |
| 43 | 43 |
| 44 return layer; | 44 return layer; |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 LayerTestCommon::VerifyQuadsAreOccluded( | 212 LayerTestCommon::VerifyQuadsAreOccluded( |
| 213 impl.quad_list(), occluded, &partially_occluded_count); | 213 impl.quad_list(), occluded, &partially_occluded_count); |
| 214 // The layer outputs one quad, which is partially occluded. | 214 // The layer outputs one quad, which is partially occluded. |
| 215 EXPECT_EQ(1u, impl.quad_list().size()); | 215 EXPECT_EQ(1u, impl.quad_list().size()); |
| 216 EXPECT_EQ(1u, partially_occluded_count); | 216 EXPECT_EQ(1u, partially_occluded_count); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace | 220 } // namespace |
| 221 } // namespace cc | 221 } // namespace cc |
| OLD | NEW |