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

Unified Diff: cc/test/layer_test_common.cc

Issue 306683002: MockQC stops create its own RP and MockOcclusionTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testocclusiontracking
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/mock_occlusion_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 66616449342dc46b216e66f064aa09a04d9f4ff3..4daca5d2f9e544a3a98691772874bb334c9244e7 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -101,8 +101,10 @@ void LayerTestCommon::VerifyQuadsCoverRectWithOcclusion(
LayerTestCommon::LayerImplTest::LayerImplTest()
: host_(FakeLayerTreeHost::Create()),
- root_layer_impl_(
- LayerImpl::Create(host_->host_impl()->active_tree(), 1)) {
+ 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_))) {
scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
host_->host_impl()->InitializeRenderer(
output_surface.PassAs<OutputSurface>());
@@ -123,10 +125,10 @@ void LayerTestCommon::LayerImplTest::AppendQuadsWithOcclusion(
const gfx::Rect& occluded) {
AppendQuadsData data;
- quad_culler_.clear_lists();
- quad_culler_.set_occluded_target_rect(occluded);
+ quad_culler_->clear_lists();
+ quad_culler_->set_occluded_target_rect(occluded);
layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider());
- layer_impl->AppendQuads(&quad_culler_, &data);
+ layer_impl->AppendQuads(quad_culler_.get(), &data);
layer_impl->DidDraw(resource_provider());
}
@@ -136,10 +138,10 @@ void LayerTestCommon::LayerImplTest::AppendQuadsForPassWithOcclusion(
const gfx::Rect& occluded) {
AppendQuadsData data(id);
- quad_culler_.clear_lists();
- quad_culler_.set_occluded_target_rect(occluded);
+ quad_culler_->clear_lists();
+ quad_culler_->set_occluded_target_rect(occluded);
layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider());
- layer_impl->AppendQuads(&quad_culler_, &data);
+ layer_impl->AppendQuads(quad_culler_.get(), &data);
layer_impl->DidDraw(resource_provider());
}
@@ -148,11 +150,11 @@ void LayerTestCommon::LayerImplTest::AppendSurfaceQuadsWithOcclusion(
const gfx::Rect& occluded) {
AppendQuadsData data;
- quad_culler_.clear_lists();
- quad_culler_.set_occluded_target_rect_for_contributing_surface(occluded);
+ quad_culler_->clear_lists();
+ quad_culler_->set_occluded_target_rect_for_contributing_surface(occluded);
bool for_replica = false;
RenderPass::Id id(1, 1);
- surface_impl->AppendQuads(&quad_culler_, &data, for_replica, id);
+ surface_impl->AppendQuads(quad_culler_.get(), &data, for_replica, id);
}
} // namespace cc
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/mock_occlusion_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698