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

Unified Diff: cc/layers/render_surface_unittest.cc

Issue 2540333002: cc: Remove map lookup from RenderSurfaceImpl::EffectTreeIndex (Closed)
Patch Set: Created 4 years 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/layers/render_surface_impl.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/render_surface_unittest.cc
diff --git a/cc/layers/render_surface_unittest.cc b/cc/layers/render_surface_unittest.cc
index ac9dd0f415ebd3493f4d613232fe2d244de9e7a6..7d9024fcd62c0de48455d8ba7361b2308a9f2e30 100644
--- a/cc/layers/render_surface_unittest.cc
+++ b/cc/layers/render_surface_unittest.cc
@@ -39,16 +39,23 @@ TEST(RenderSurfaceTest, VerifySurfaceChangesAreTrackedProperly) {
FakeImplTaskRunnerProvider task_runner_provider;
TestTaskGraphRunner task_graph_runner;
+ std::unique_ptr<CompositorFrameSink> compositor_frame_sink =
+ FakeCompositorFrameSink::Create3d();
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &task_graph_runner);
std::unique_ptr<LayerImpl> owning_layer =
LayerImpl::Create(host_impl.active_tree(), 1);
- owning_layer->SetHasRenderSurface(true);
- ASSERT_TRUE(owning_layer->render_surface());
- RenderSurfaceImpl* render_surface = owning_layer->render_surface();
+ owning_layer->test_properties()->force_render_surface = true;
gfx::Rect test_rect(3, 4, 5, 6);
host_impl.active_tree()->ResetAllChangeTracking();
host_impl.active_tree()->SetRootLayerForTesting(std::move(owning_layer));
- host_impl.active_tree()->BuildPropertyTreesForTesting();
+ host_impl.SetVisible(true);
+ host_impl.InitializeRenderer(compositor_frame_sink.get());
+ host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
+ host_impl.active_tree()->UpdateDrawProperties(false /* update_lcd_text */);
+
+ RenderSurfaceImpl* render_surface =
+ host_impl.active_tree()->root_layer_for_testing()->render_surface();
+ ASSERT_TRUE(render_surface);
// Currently, the content_rect, clip_rect, and
// owning_layer->layerPropertyChanged() are the only sources of change.
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698