diff options
author | weiliangc@chromium.org <weiliangc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 05:50:36 +0000 |
---|---|---|
committer | weiliangc@chromium.org <weiliangc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 05:50:36 +0000 |
commit | c6707fdbb7ab92a3ded2f6f18542bc77770e9cfc (patch) | |
tree | f48af1cf16e746234a67d19ab3e26772d7fb3ea7 /cc/test/layer_test_common.cc | |
parent | 8ef1b247b6685d8c87e936c4b0427aa464fad464 (diff) | |
download | chromium_src-c6707fdbb7ab92a3ded2f6f18542bc77770e9cfc.zip chromium_src-c6707fdbb7ab92a3ded2f6f18542bc77770e9cfc.tar.gz chromium_src-c6707fdbb7ab92a3ded2f6f18542bc77770e9cfc.tar.bz2 |
Removed QuadSink and MockQuadCuller
Since QuadSink does not provide more functionatility than passing
through to RenderPass and OcclusionTracker, it can be torn down and
removed. Same is for MockQuadCuller.
This CL follows 302603006, 306683002, 309493002.
BUG=344962
TEST=cc_unittests
Review URL: https://codereview.chromium.org/308193003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/layer_test_common.cc')
-rw-r--r-- | cc/test/layer_test_common.cc | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc index 4daca5d..7a0de16 100644 --- a/cc/test/layer_test_common.cc +++ b/cc/test/layer_test_common.cc @@ -10,6 +10,7 @@ #include "cc/quads/draw_quad.h" #include "cc/quads/render_pass.h" #include "cc/test/fake_output_surface.h" +#include "cc/test/mock_occlusion_tracker.h" #include "cc/trees/layer_tree_host_common.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/point_conversions.h" @@ -102,9 +103,7 @@ void LayerTestCommon::VerifyQuadsCoverRectWithOcclusion( LayerTestCommon::LayerImplTest::LayerImplTest() : host_(FakeLayerTreeHost::Create()), root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), - render_pass_(RenderPass::Create()), - quad_culler_(make_scoped_ptr( - new MockQuadCuller(render_pass_.get(), &occlusion_tracker_))) { + render_pass_(RenderPass::Create()) { scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); host_->host_impl()->InitializeRenderer( output_surface.PassAs<OutputSurface>()); @@ -125,10 +124,11 @@ void LayerTestCommon::LayerImplTest::AppendQuadsWithOcclusion( const gfx::Rect& occluded) { AppendQuadsData data; - quad_culler_->clear_lists(); - quad_culler_->set_occluded_target_rect(occluded); + render_pass_->quad_list.clear(); + render_pass_->shared_quad_state_list.clear(); + occlusion_tracker_.set_occluded_target_rect(occluded); layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); - layer_impl->AppendQuads(quad_culler_.get(), &data); + layer_impl->AppendQuads(render_pass_.get(), occlusion_tracker_, &data); layer_impl->DidDraw(resource_provider()); } @@ -138,10 +138,11 @@ void LayerTestCommon::LayerImplTest::AppendQuadsForPassWithOcclusion( const gfx::Rect& occluded) { AppendQuadsData data(id); - quad_culler_->clear_lists(); - quad_culler_->set_occluded_target_rect(occluded); + render_pass_->quad_list.clear(); + render_pass_->shared_quad_state_list.clear(); + occlusion_tracker_.set_occluded_target_rect(occluded); layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); - layer_impl->AppendQuads(quad_culler_.get(), &data); + layer_impl->AppendQuads(render_pass_.get(), occlusion_tracker_, &data); layer_impl->DidDraw(resource_provider()); } @@ -150,11 +151,14 @@ void LayerTestCommon::LayerImplTest::AppendSurfaceQuadsWithOcclusion( const gfx::Rect& occluded) { AppendQuadsData data; - quad_culler_->clear_lists(); - quad_culler_->set_occluded_target_rect_for_contributing_surface(occluded); + render_pass_->quad_list.clear(); + render_pass_->shared_quad_state_list.clear(); + occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( + occluded); bool for_replica = false; RenderPass::Id id(1, 1); - surface_impl->AppendQuads(quad_culler_.get(), &data, for_replica, id); + surface_impl->AppendQuads( + render_pass_.get(), occlusion_tracker_, &data, for_replica, id); } } // namespace cc |