@@ -121,12 +121,16 @@ - (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 );
124125 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
125126 /* delegate=*/ mock_delegate,
126127 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
128+ /* ios_surface_factory=*/ surface_factory,
127129 /* task_runners=*/ runners);
128130
129- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
131+ auto flutterPlatformViewsController =
132+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
133+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
130134
131135 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
132136 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -175,12 +179,16 @@ - (void)testCompositePlatformView {
175179 /* raster=*/ thread_task_runner,
176180 /* ui=*/ thread_task_runner,
177181 /* io=*/ thread_task_runner);
182+ auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
178183 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
179184 /* delegate=*/ mock_delegate,
180185 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
186+ /* ios_surface_factory=*/ surface_factory,
181187 /* task_runners=*/ runners);
182188
183- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
189+ auto flutterPlatformViewsController =
190+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
191+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
184192
185193 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
186194 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -230,12 +238,16 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView {
230238 /* raster=*/ thread_task_runner,
231239 /* ui=*/ thread_task_runner,
232240 /* io=*/ thread_task_runner);
241+ auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
233242 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
234243 /* delegate=*/ mock_delegate,
235244 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
245+ /* ios_surface_factory=*/ surface_factory,
236246 /* task_runners=*/ runners);
237247
238- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
248+ auto flutterPlatformViewsController =
249+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
250+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
239251
240252 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
241253 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -301,12 +313,16 @@ - (void)testClipRect {
301313 /* raster=*/ thread_task_runner,
302314 /* ui=*/ thread_task_runner,
303315 /* io=*/ thread_task_runner);
316+ auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
304317 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
305318 /* delegate=*/ mock_delegate,
306319 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
320+ /* ios_surface_factory=*/ surface_factory,
307321 /* task_runners=*/ runners);
308322
309- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
323+ auto flutterPlatformViewsController =
324+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
325+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
310326
311327 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
312328 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -373,12 +389,16 @@ - (void)testClipRRect {
373389 /* raster=*/ thread_task_runner,
374390 /* ui=*/ thread_task_runner,
375391 /* io=*/ thread_task_runner);
392+ auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
376393 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
377394 /* delegate=*/ mock_delegate,
378395 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
396+ /* ios_surface_factory=*/ surface_factory,
379397 /* task_runners=*/ runners);
380398
381- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
399+ auto flutterPlatformViewsController =
400+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
401+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
382402
383403 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
384404 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -445,12 +465,16 @@ - (void)testClipPath {
445465 /* raster=*/ thread_task_runner,
446466 /* ui=*/ thread_task_runner,
447467 /* io=*/ thread_task_runner);
468+ auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
448469 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
449470 /* delegate=*/ mock_delegate,
450471 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
472+ /* ios_surface_factory=*/ surface_factory,
451473 /* task_runners=*/ runners);
452474
453- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
475+ auto flutterPlatformViewsController =
476+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
477+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
454478
455479 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
456480 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
@@ -518,12 +542,16 @@ - (void)testSetFlutterViewControllerAfterCreateCanStillDispatchTouchEvents {
518542 /* raster=*/ thread_task_runner,
519543 /* ui=*/ thread_task_runner,
520544 /* io=*/ thread_task_runner);
545+ auto surface_factory = flutter::IOSSurfaceFactory::Create (flutter::IOSRenderingAPI::kSoftware );
521546 auto platform_view = std::make_unique<flutter::PlatformViewIOS>(
522547 /* delegate=*/ mock_delegate,
523548 /* rendering_api=*/ flutter::IOSRenderingAPI::kSoftware ,
549+ /* ios_surface_factory=*/ surface_factory,
524550 /* task_runners=*/ runners);
525551
526- auto flutterPlatformViewsController = std::make_unique<flutter::FlutterPlatformViewsController>();
552+ auto flutterPlatformViewsController =
553+ std::make_unique<flutter::FlutterPlatformViewsController>(surface_factory);
554+ surface_factory->SetPlatformViewsController (flutterPlatformViewsController.get ());
527555
528556 FlutterPlatformViewsTestMockFlutterPlatformFactory* factory =
529557 [[FlutterPlatformViewsTestMockFlutterPlatformFactory new ] autorelease ];
0 commit comments