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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 LayerTestCommon::LayerImplTest::LayerImplTest() | 109 LayerTestCommon::LayerImplTest::LayerImplTest() |
110 : client_(FakeLayerTreeHostClient::DIRECT_3D), | 110 : client_(FakeLayerTreeHostClient::DIRECT_3D), |
111 host_(FakeLayerTreeHost::Create(&client_)), | 111 host_(FakeLayerTreeHost::Create(&client_)), |
112 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), | 112 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), |
113 render_pass_(RenderPass::Create()) { | 113 render_pass_(RenderPass::Create()) { |
114 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); | 114 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); |
115 host_->host_impl()->InitializeRenderer( | 115 host_->host_impl()->InitializeRenderer(FakeOutputSurface::Create3d()); |
116 output_surface.PassAs<OutputSurface>()); | |
117 } | 116 } |
118 | 117 |
119 LayerTestCommon::LayerImplTest::~LayerImplTest() {} | 118 LayerTestCommon::LayerImplTest::~LayerImplTest() {} |
120 | 119 |
121 void LayerTestCommon::LayerImplTest::CalcDrawProps( | 120 void LayerTestCommon::LayerImplTest::CalcDrawProps( |
122 const gfx::Size& viewport_size) { | 121 const gfx::Size& viewport_size) { |
123 LayerImplList layer_list; | 122 LayerImplList layer_list; |
124 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 123 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
125 root_layer_impl_.get(), viewport_size, &layer_list); | 124 root_layer_impl_.get(), viewport_size, &layer_list); |
126 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 125 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 render_pass_->shared_quad_state_list.clear(); | 161 render_pass_->shared_quad_state_list.clear(); |
163 occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( | 162 occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( |
164 occluded); | 163 occluded); |
165 bool for_replica = false; | 164 bool for_replica = false; |
166 RenderPassId id(1, 1); | 165 RenderPassId id(1, 1); |
167 surface_impl->AppendQuads( | 166 surface_impl->AppendQuads( |
168 render_pass_.get(), occlusion_tracker_, &data, for_replica, id); | 167 render_pass_.get(), occlusion_tracker_, &data, for_replica, id); |
169 } | 168 } |
170 | 169 |
171 } // namespace cc | 170 } // namespace cc |
OLD | NEW |