@@ -105,7 +105,7 @@ TEST(RasterizerTest, drawEmptyPipeline) {
105105 rasterizer->Setup (std::move (surface));
106106 fml::AutoResetWaitableEvent latch;
107107 thread_host.raster_thread ->GetTaskRunner ()->PostTask ([&] {
108- auto pipeline = fml::AdoptRef ( new Pipeline<LayerTree>(/* depth=*/ 10 ) );
108+ auto pipeline = std::make_shared< Pipeline<LayerTree>> (/* depth=*/ 10 );
109109 rasterizer->Draw (CreateFinishedBuildRecorder (), pipeline, nullptr );
110110 latch.Signal ();
111111 });
@@ -157,7 +157,7 @@ TEST(RasterizerTest,
157157 rasterizer->Setup (std::move (surface));
158158 fml::AutoResetWaitableEvent latch;
159159 thread_host.raster_thread ->GetTaskRunner ()->PostTask ([&] {
160- auto pipeline = fml::AdoptRef ( new Pipeline<LayerTree>(/* depth=*/ 10 ) );
160+ auto pipeline = std::make_shared< Pipeline<LayerTree>> (/* depth=*/ 10 );
161161 auto layer_tree = std::make_unique<LayerTree>(/* frame_size=*/ SkISize (),
162162 /* device_pixel_ratio=*/ 2 .0f );
163163 bool result = pipeline->Produce ().Complete (std::move (layer_tree));
@@ -211,7 +211,7 @@ TEST(
211211 rasterizer->Setup (std::move (surface));
212212 fml::AutoResetWaitableEvent latch;
213213 thread_host.raster_thread ->GetTaskRunner ()->PostTask ([&] {
214- auto pipeline = fml::AdoptRef ( new Pipeline<LayerTree>(/* depth=*/ 10 ) );
214+ auto pipeline = std::make_shared< Pipeline<LayerTree>> (/* depth=*/ 10 );
215215 auto layer_tree = std::make_unique<LayerTree>(/* frame_size=*/ SkISize (),
216216 /* device_pixel_ratio=*/ 2 .0f );
217217 bool result = pipeline->Produce ().Complete (std::move (layer_tree));
@@ -270,7 +270,7 @@ TEST(
270270
271271 rasterizer->Setup (std::move (surface));
272272
273- auto pipeline = fml::AdoptRef ( new Pipeline<LayerTree>(/* depth=*/ 10 ) );
273+ auto pipeline = std::make_shared< Pipeline<LayerTree>> (/* depth=*/ 10 );
274274 auto layer_tree = std::make_unique<LayerTree>(/* frame_size=*/ SkISize (),
275275 /* device_pixel_ratio=*/ 2 .0f );
276276 bool result = pipeline->Produce ().Complete (std::move (layer_tree));
@@ -307,7 +307,7 @@ TEST(RasterizerTest, externalViewEmbedderDoesntEndFrameWhenNoSurfaceIsSet) {
307307
308308 fml::AutoResetWaitableEvent latch;
309309 thread_host.raster_thread ->GetTaskRunner ()->PostTask ([&] {
310- auto pipeline = fml::AdoptRef ( new Pipeline<LayerTree>(/* depth=*/ 10 ) );
310+ auto pipeline = std::make_shared< Pipeline<LayerTree>> (/* depth=*/ 10 );
311311 auto no_discard = [](LayerTree&) { return false ; };
312312 rasterizer->Draw (CreateFinishedBuildRecorder (), pipeline, no_discard);
313313 latch.Signal ();
0 commit comments