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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings) | 115 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings) |
116 : client_(FakeLayerTreeHostClient::DIRECT_3D), | 116 : client_(FakeLayerTreeHostClient::DIRECT_3D), |
117 output_surface_(FakeOutputSurface::Create3d()), | 117 output_surface_(FakeOutputSurface::Create3d()), |
118 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)), | 118 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)), |
119 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), | 119 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), |
120 render_pass_(RenderPass::Create()), | 120 render_pass_(RenderPass::Create()), |
121 layer_impl_id_(2) { | 121 layer_impl_id_(2) { |
122 root_layer_impl_->SetHasRenderSurface(true); | 122 root_layer_impl_->SetHasRenderSurface(true); |
| 123 host_->host_impl()->SetVisible(true); |
123 host_->host_impl()->InitializeRenderer(output_surface_.get()); | 124 host_->host_impl()->InitializeRenderer(output_surface_.get()); |
124 } | 125 } |
125 | 126 |
126 LayerTestCommon::LayerImplTest::~LayerImplTest() {} | 127 LayerTestCommon::LayerImplTest::~LayerImplTest() {} |
127 | 128 |
128 void LayerTestCommon::LayerImplTest::CalcDrawProps( | 129 void LayerTestCommon::LayerImplTest::CalcDrawProps( |
129 const gfx::Size& viewport_size) { | 130 const gfx::Size& viewport_size) { |
130 LayerImplList layer_list; | 131 LayerImplList layer_list; |
131 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 132 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
132 root_layer_impl_.get(), viewport_size, &layer_list); | 133 root_layer_impl_.get(), viewport_size, &layer_list); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 render_pass_->shared_quad_state_list.clear(); | 180 render_pass_->shared_quad_state_list.clear(); |
180 | 181 |
181 surface_impl->AppendQuads( | 182 surface_impl->AppendQuads( |
182 render_pass_.get(), gfx::Transform(), | 183 render_pass_.get(), gfx::Transform(), |
183 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), | 184 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), |
184 SimpleEnclosedRegion()), | 185 SimpleEnclosedRegion()), |
185 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1)); | 186 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1)); |
186 } | 187 } |
187 | 188 |
188 } // namespace cc | 189 } // namespace cc |
OLD | NEW |