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/test/layer_test_common.h" | 5 #include "cc/test/layer_test_common.h" |
6 | 6 |
7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } else { | 106 } else { |
107 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString()); | 107 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString()); |
108 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); | 108 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); |
109 ++(*partially_occluded_count); | 109 ++(*partially_occluded_count); |
110 } | 110 } |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 LayerTestCommon::LayerImplTest::LayerImplTest() | 114 LayerTestCommon::LayerImplTest::LayerImplTest() |
115 : client_(FakeLayerTreeHostClient::DIRECT_3D), | 115 : client_(FakeLayerTreeHostClient::DIRECT_3D), |
116 host_(FakeLayerTreeHost::Create(&client_)), | 116 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)), |
117 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), | 117 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), |
118 render_pass_(RenderPass::Create()) { | 118 render_pass_(RenderPass::Create()) { |
119 root_layer_impl_->SetHasRenderSurface(true); | 119 root_layer_impl_->SetHasRenderSurface(true); |
120 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); | 120 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); |
121 host_->host_impl()->InitializeRenderer(FakeOutputSurface::Create3d()); | 121 host_->host_impl()->InitializeRenderer(FakeOutputSurface::Create3d()); |
122 } | 122 } |
123 | 123 |
124 LayerTestCommon::LayerImplTest::~LayerImplTest() {} | 124 LayerTestCommon::LayerImplTest::~LayerImplTest() {} |
125 | 125 |
126 void LayerTestCommon::LayerImplTest::CalcDrawProps( | 126 void LayerTestCommon::LayerImplTest::CalcDrawProps( |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 render_pass_->shared_quad_state_list.clear(); | 177 render_pass_->shared_quad_state_list.clear(); |
178 | 178 |
179 surface_impl->AppendQuads( | 179 surface_impl->AppendQuads( |
180 render_pass_.get(), gfx::Transform(), | 180 render_pass_.get(), gfx::Transform(), |
181 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), | 181 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), |
182 SimpleEnclosedRegion()), | 182 SimpleEnclosedRegion()), |
183 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1)); | 183 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1)); |
184 } | 184 } |
185 | 185 |
186 } // namespace cc | 186 } // namespace cc |
OLD | NEW |