@@ -121,16 +121,12 @@ - (void)testCanCreatePlatformViewWithoutFlutterView {
121121 /* raster=*/ thread_task_runner,
122122 /* ui=*/ thread_task_runner,
123123 /* io=*/ thread_task_runner);
124- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
125124 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
126125 /* delegate=*/ mock_delegate,
127126 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
128- /* ios_surface_factory=*/ surface_factory,
129127 /* task_runners=*/ runners);
130128
131- auto flutterPlatformViewsController =
132- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
133- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
129+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
134130
135131 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
136132 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -179,16 +175,12 @@ - (void)testCompositePlatformView {
179175 /* raster=*/ thread_task_runner,
180176 /* ui=*/ thread_task_runner,
181177 /* io=*/ thread_task_runner);
182- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
183178 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
184179 /* delegate=*/ mock_delegate,
185180 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
186- /* ios_surface_factory=*/ surface_factory,
187181 /* task_runners=*/ runners);
188182
189- auto flutterPlatformViewsController =
190- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
191- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
183+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
192184
193185 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
194186 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -238,16 +230,12 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView {
238230 /* raster=*/ thread_task_runner,
239231 /* ui=*/ thread_task_runner,
240232 /* io=*/ thread_task_runner);
241- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
242233 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
243234 /* delegate=*/ mock_delegate,
244235 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
245- /* ios_surface_factory=*/ surface_factory,
246236 /* task_runners=*/ runners);
247237
248- auto flutterPlatformViewsController =
249- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
250- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
238+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
251239
252240 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
253241 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -313,16 +301,12 @@ - (void)testClipRect {
313301 /* raster=*/ thread_task_runner,
314302 /* ui=*/ thread_task_runner,
315303 /* io=*/ thread_task_runner);
316- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
317304 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
318305 /* delegate=*/ mock_delegate,
319306 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
320- /* ios_surface_factory=*/ surface_factory,
321307 /* task_runners=*/ runners);
322308
323- auto flutterPlatformViewsController =
324- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
325- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
309+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
326310
327311 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
328312 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -389,16 +373,12 @@ - (void)testClipRRect {
389373 /* raster=*/ thread_task_runner,
390374 /* ui=*/ thread_task_runner,
391375 /* io=*/ thread_task_runner);
392- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
393376 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
394377 /* delegate=*/ mock_delegate,
395378 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
396- /* ios_surface_factory=*/ surface_factory,
397379 /* task_runners=*/ runners);
398380
399- auto flutterPlatformViewsController =
400- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
401- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
381+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
402382
403383 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
404384 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -465,16 +445,12 @@ - (void)testClipPath {
465445 /* raster=*/ thread_task_runner,
466446 /* ui=*/ thread_task_runner,
467447 /* io=*/ thread_task_runner);
468- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
469448 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
470449 /* delegate=*/ mock_delegate,
471450 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
472- /* ios_surface_factory=*/ surface_factory,
473451 /* task_runners=*/ runners);
474452
475- auto flutterPlatformViewsController =
476- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
477- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
453+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
478454
479455 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
480456 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -542,16 +518,12 @@ - (void)testSetFlutterViewControllerAfterCreateCanStillDispatchTouchEvents {
542518 /* raster=*/ thread_task_runner,
543519 /* ui=*/ thread_task_runner,
544520 /* io=*/ thread_task_runner);
545- auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
546521 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
547522 /* delegate=*/ mock_delegate,
548523 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
549- /* ios_surface_factory=*/ surface_factory,
550524 /* task_runners=*/ runners);
551525
552- auto flutterPlatformViewsController =
553- std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
554- surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
526+ auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
555527
556528 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
557529 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
0 commit comments