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

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

Issue 348093004: Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 EXPECT_EQ(quad->rect.ToString(), quad->visible_rect.ToString()); 93 EXPECT_EQ(quad->rect.ToString(), quad->visible_rect.ToString());
94 } else { 94 } else {
95 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString()); 95 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString());
96 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); 96 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect));
97 ++(*partially_occluded_count); 97 ++(*partially_occluded_count);
98 } 98 }
99 } 99 }
100 } 100 }
101 101
102 LayerTestCommon::LayerImplTest::LayerImplTest() 102 LayerTestCommon::LayerImplTest::LayerImplTest()
103 : host_(FakeLayerTreeHost::Create()), 103 : client_(FakeLayerTreeHostClient::DIRECT_3D),
104 host_(FakeLayerTreeHost::Create(&client_)),
104 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), 105 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)),
105 render_pass_(RenderPass::Create()), 106 render_pass_(RenderPass::Create()),
106 quad_culler_(make_scoped_ptr( 107 quad_culler_(make_scoped_ptr(
107 new MockQuadCuller(render_pass_.get(), &occlusion_tracker_))) { 108 new MockQuadCuller(render_pass_.get(), &occlusion_tracker_))) {
108 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); 109 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
109 host_->host_impl()->InitializeRenderer( 110 host_->host_impl()->InitializeRenderer(
110 output_surface.PassAs<OutputSurface>()); 111 output_surface.PassAs<OutputSurface>());
111 } 112 }
112 113
113 LayerTestCommon::LayerImplTest::~LayerImplTest() {} 114 LayerTestCommon::LayerImplTest::~LayerImplTest() {}
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 AppendQuadsData data; 152 AppendQuadsData data;
152 153
153 quad_culler_->clear_lists(); 154 quad_culler_->clear_lists();
154 quad_culler_->set_occluded_target_rect_for_contributing_surface(occluded); 155 quad_culler_->set_occluded_target_rect_for_contributing_surface(occluded);
155 bool for_replica = false; 156 bool for_replica = false;
156 RenderPass::Id id(1, 1); 157 RenderPass::Id id(1, 1);
157 surface_impl->AppendQuads(quad_culler_.get(), &data, for_replica, id); 158 surface_impl->AppendQuads(quad_culler_.get(), &data, for_replica, id);
158 } 159 }
159 160
160 } // namespace cc 161 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698