Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: cc/test/layer_test_common.cc

Issue 1356463002: Revert of cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } 110 }
111 } 111 }
112 112
113 LayerTestCommon::LayerImplTest::LayerImplTest() 113 LayerTestCommon::LayerImplTest::LayerImplTest()
114 : LayerImplTest(LayerTreeSettings()) { 114 : LayerImplTest(LayerTreeSettings()) {
115 } 115 }
116 116
117 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings) 117 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
118 : client_(FakeLayerTreeHostClient::DIRECT_3D), 118 : client_(FakeLayerTreeHostClient::DIRECT_3D),
119 output_surface_(FakeOutputSurface::Create3d()),
120 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)), 119 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)),
121 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), 120 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)),
122 render_pass_(RenderPass::Create()), 121 render_pass_(RenderPass::Create()),
123 layer_impl_id_(2) { 122 layer_impl_id_(2) {
124 root_layer_impl_->SetHasRenderSurface(true); 123 root_layer_impl_->SetHasRenderSurface(true);
125 host_->host_impl()->InitializeRenderer(output_surface_.get()); 124 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
125 host_->host_impl()->InitializeRenderer(FakeOutputSurface::Create3d());
126 } 126 }
127 127
128 LayerTestCommon::LayerImplTest::~LayerImplTest() {} 128 LayerTestCommon::LayerImplTest::~LayerImplTest() {}
129 129
130 void LayerTestCommon::LayerImplTest::CalcDrawProps( 130 void LayerTestCommon::LayerImplTest::CalcDrawProps(
131 const gfx::Size& viewport_size) { 131 const gfx::Size& viewport_size) {
132 LayerImplList layer_list; 132 LayerImplList layer_list;
133 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 133 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
134 root_layer_impl_.get(), viewport_size, &layer_list); 134 root_layer_impl_.get(), viewport_size, &layer_list);
135 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 135 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 render_pass_->shared_quad_state_list.clear(); 181 render_pass_->shared_quad_state_list.clear();
182 182
183 surface_impl->AppendQuads( 183 surface_impl->AppendQuads(
184 render_pass_.get(), gfx::Transform(), 184 render_pass_.get(), gfx::Transform(),
185 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), 185 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded),
186 SimpleEnclosedRegion()), 186 SimpleEnclosedRegion()),
187 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1)); 187 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1));
188 } 188 }
189 189
190 } // namespace cc 190 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698