From 9c6f44594cd930fb451b4afa7b37e939852b36e8 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 19 Nov 2020 09:53:03 -0800 Subject: [PATCH 1/3] PlatformViewsController: clear composition_order_ in the beginning of each frame. (#22574) --- .../framework/Source/FlutterPlatformViews.mm | 18 +++--- .../Source/FlutterPlatformViewsTest.mm | 63 +++++++++++++++---- .../Source/FlutterPlatformViews_Internal.h | 12 ++-- shell/platform/darwin/ios/ios_surface.mm | 3 +- .../Scenarios.xcodeproj/project.pbxproj | 6 ++ .../ios/Scenarios/Scenarios/AppDelegate.m | 8 ++- .../Scenarios/Scenarios/ContinuousTexture.h | 20 ++++++ .../Scenarios/Scenarios/ContinuousTexture.m | 43 +++++++++++++ .../ScenariosUITests/PlatformViewUITests.m | 33 ++++++++++ .../scenario_app/lib/src/platform_view.dart | 17 +++++ testing/scenario_app/lib/src/scenarios.dart | 1 + 11 files changed, 193 insertions(+), 31 deletions(-) create mode 100644 testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.h create mode 100644 testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.m diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 71559ccb41f94..3159607181275 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -242,13 +242,13 @@ gesture_recognizers_blocking_policies[idString] = gestureRecognizerBlockingPolicy; } -void FlutterPlatformViewsController::SetFrameSize(SkISize frame_size) { +void FlutterPlatformViewsController::BeginFrame(SkISize frame_size) { + ResetFrameState(); frame_size_ = frame_size; } void FlutterPlatformViewsController::CancelFrame() { - picture_recorders_.clear(); - composition_order_.clear(); + ResetFrameState(); } // TODO(cyanglaz): https://github.com/flutter/flutter/issues/56474 @@ -589,13 +589,6 @@ } } -void FlutterPlatformViewsController::EndFrame( - bool should_resubmit_frame, - fml::RefPtr raster_thread_merger) { - // Reset the composition order, so next frame starts empty. - composition_order_.clear(); -} - std::shared_ptr FlutterPlatformViewsController::GetLayer( GrDirectContext* gr_context, std::shared_ptr ios_context, @@ -691,6 +684,11 @@ } } +void FlutterPlatformViewsController::ResetFrameState() { + picture_recorders_.clear(); + composition_order_.clear(); +} + } // namespace flutter // This recognizers delays touch events from being dispatched to the responder chain until it failed diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm index 2434a31af747e..164415c09621a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm @@ -142,8 +142,6 @@ - (void)testCanCreatePlatformViewWithoutFlutterView { result); XCTAssertNotNil(gMockPlatformView); - - flutterPlatformViewsController->Reset(); } - (void)testChildClippingViewHitTests { @@ -219,7 +217,6 @@ - (void)testCompositePlatformView { CGRect platformViewRectInFlutterView = [gMockPlatformView convertRect:gMockPlatformView.bounds toView:mockFlutterView]; XCTAssertTrue(CGRectEqualToRect(platformViewRectInFlutterView, CGRectMake(100, 100, 300, 300))); - flutterPlatformViewsController->Reset(); } - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView { @@ -289,8 +286,6 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView { XCTAssertLessThan( fabs(platformViewRectInFlutterView.size.height - childClippingView.frame.size.height), kFloatCompareEpsilon); - - flutterPlatformViewsController->Reset(); } - (void)testClipRect { @@ -362,7 +357,6 @@ - (void)testClipRect { } } } - flutterPlatformViewsController->Reset(); } - (void)testClipRRect { @@ -434,7 +428,6 @@ - (void)testClipRRect { } } } - flutterPlatformViewsController->Reset(); } - (void)testClipPath { @@ -507,7 +500,6 @@ - (void)testClipPath { } } } - flutterPlatformViewsController->Reset(); } - (void)testSetFlutterViewControllerAfterCreateCanStillDispatchTouchEvents { @@ -570,8 +562,6 @@ - (void)testSetFlutterViewControllerAfterCreateCanStillDispatchTouchEvents { flutterPlatformViewsController->SetFlutterViewController(mockFlutterViewContoller); [forwardGectureRecognizer touchesBegan:touches2 withEvent:event2]; OCMVerify([mockFlutterViewContoller touchesBegan:touches2 withEvent:event2]); - - flutterPlatformViewsController->Reset(); } - (void)testFlutterPlatformViewControllerSubmitFrameWithoutFlutterViewNotCrashing { @@ -628,8 +618,59 @@ - (void)testFlutterPlatformViewControllerSubmitFrameWithoutFlutterViewNotCrashin [](const flutter::SurfaceFrame& surface_frame, SkCanvas* canvas) { return true; }); XCTAssertTrue(flutterPlatformViewsController->SubmitFrame(nullptr, nullptr, std::move(mock_surface_submit_false))); +} + +- (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { + flutter::FlutterPlatformViewsTestMockPlatformViewDelegate mock_delegate; + auto thread_task_runner = CreateNewThread("FlutterPlatformViewsTest"); + flutter::TaskRunners runners(/*label=*/self.name.UTF8String, + /*platform=*/thread_task_runner, + /*raster=*/thread_task_runner, + /*ui=*/thread_task_runner, + /*io=*/thread_task_runner); + auto flutterPlatformViewsController = std::make_shared(); + auto platform_view = std::make_unique( + /*delegate=*/mock_delegate, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*platform_views_controller=*/flutterPlatformViewsController, + /*task_runners=*/runners); + + UIView* mockFlutterView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)] autorelease]; + flutterPlatformViewsController->SetFlutterView(mockFlutterView); - flutterPlatformViewsController->Reset(); + FlutterPlatformViewsTestMockFlutterPlatformFactory* factory = + [[FlutterPlatformViewsTestMockFlutterPlatformFactory new] autorelease]; + flutterPlatformViewsController->RegisterViewFactory( + factory, @"MockFlutterPlatformView", + FlutterPlatformViewGestureRecognizersBlockingPolicyEager); + FlutterResult result = ^(id result) { + }; + + flutterPlatformViewsController->OnMethodCall( + [FlutterMethodCall + methodCallWithMethodName:@"create" + arguments:@{@"id" : @0, @"viewType" : @"MockFlutterPlatformView"}], + result); + + // First frame, |GetCurrentCanvases| is not empty after composite. + flutterPlatformViewsController->BeginFrame(SkISize::Make(300, 300)); + flutter::MutatorsStack stack; + SkMatrix finalMatrix; + auto embeddedViewParams1 = + std::make_unique(finalMatrix, SkSize::Make(300, 300), stack); + flutterPlatformViewsController->PrerollCompositeEmbeddedView(0, std::move(embeddedViewParams1)); + flutterPlatformViewsController->CompositeEmbeddedView(0); + XCTAssertEqual(flutterPlatformViewsController->GetCurrentCanvases().size(), 1UL); + + // Second frame, |GetCurrentCanvases| should be empty at the start + flutterPlatformViewsController->BeginFrame(SkISize::Make(300, 300)); + XCTAssertTrue(flutterPlatformViewsController->GetCurrentCanvases().empty()); + + auto embeddedViewParams2 = + std::make_unique(finalMatrix, SkSize::Make(300, 300), stack); + flutterPlatformViewsController->PrerollCompositeEmbeddedView(0, std::move(embeddedViewParams2)); + flutterPlatformViewsController->CompositeEmbeddedView(0); + XCTAssertEqual(flutterPlatformViewsController->GetCurrentCanvases().size(), 1UL); } - (int)alphaOfPoint:(CGPoint)point onView:(UIView*)view { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index f3f7038be31c6..e2c7eb42371ef 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h @@ -140,7 +140,8 @@ class FlutterPlatformViewsController { NSString* factoryId, FlutterPlatformViewGestureRecognizersBlockingPolicy gestureRecognizerBlockingPolicy); - void SetFrameSize(SkISize frame_size); + // Called at the begining of each frame. + void BeginFrame(SkISize frame_size); // Indicates that we don't compisite any platform views or overlays during this frame. // Also reverts the composition_order_ to its original state at the begining of the frame. @@ -173,12 +174,6 @@ class FlutterPlatformViewsController { std::shared_ptr ios_context, std::unique_ptr frame); - // Invoked at the very end of a frame. - // After invoking this method, nothing should happen on the current TaskRunner during the same - // frame. - void EndFrame(bool should_resubmit_frame, - fml::RefPtr raster_thread_merger); - void OnMethodCall(FlutterMethodCall* call, FlutterResult& result); private: @@ -303,6 +298,9 @@ class FlutterPlatformViewsController { // Commit a CATransaction if |BeginCATransaction| has been called during the frame. void CommitCATransactionIfNeeded(); + // Resets the state of the frame. + void ResetFrameState(); + FML_DISALLOW_COPY_AND_ASSIGN(FlutterPlatformViewsController); }; diff --git a/shell/platform/darwin/ios/ios_surface.mm b/shell/platform/darwin/ios/ios_surface.mm index 0fe9cb69ca9e5..98e72faf58e35 100644 --- a/shell/platform/darwin/ios/ios_surface.mm +++ b/shell/platform/darwin/ios/ios_surface.mm @@ -80,7 +80,7 @@ fml::RefPtr raster_thread_merger) { TRACE_EVENT0("flutter", "IOSSurface::BeginFrame"); FML_CHECK(platform_views_controller_ != nullptr); - platform_views_controller_->SetFrameSize(frame_size); + platform_views_controller_->BeginFrame(frame_size); } // |ExternalViewEmbedder| @@ -127,7 +127,6 @@ fml::RefPtr raster_thread_merger) { TRACE_EVENT0("flutter", "IOSSurface::EndFrame"); FML_CHECK(platform_views_controller_ != nullptr); - return platform_views_controller_->EndFrame(should_resubmit_frame, raster_thread_merger); } // |ExternalViewEmbedder| diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index cc4462541c2d5..466f46aee7441 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -56,6 +56,7 @@ 6816DBAD2318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA82318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png */; }; 6816DBAE2318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6816DBA92318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png */; }; 68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */; }; + 68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D4017C2564859300ECD91A /* ContinuousTexture.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -170,6 +171,8 @@ 6816DBA82318696600A51400 /* golden_platform_view_cliprect_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_cliprect_iPhone SE_simulator.png"; sourceTree = ""; }; 6816DBA92318696600A51400 /* golden_platform_view_cliprrect_iPhone SE_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_cliprrect_iPhone SE_simulator.png"; sourceTree = ""; }; 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGestureRecognizerTests.m; sourceTree = ""; }; + 68D4017B2564859300ECD91A /* ContinuousTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContinuousTexture.h; sourceTree = ""; }; + 68D4017C2564859300ECD91A /* ContinuousTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContinuousTexture.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -236,6 +239,8 @@ 0A57B3BC2323C4BD00DD9521 /* ScreenBeforeFlutter.m */, 0A57B3BE2323C74200DD9521 /* FlutterEngine+ScenariosTest.m */, 0A57B3C02323C74D00DD9521 /* FlutterEngine+ScenariosTest.h */, + 68D4017B2564859300ECD91A /* ContinuousTexture.h */, + 68D4017C2564859300ECD91A /* ContinuousTexture.m */, ); path = Scenarios; sourceTree = ""; @@ -459,6 +464,7 @@ buildActionMask = 2147483647; files = ( 248D76DA22E388380012F0C1 /* main.m in Sources */, + 68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */, 24F1FB89230B4579005ACE7C /* TextPlatformView.m in Sources */, 248D76CC22E388370012F0C1 /* AppDelegate.m in Sources */, 0A57B3BF2323C74200DD9521 /* FlutterEngine+ScenariosTest.m in Sources */, diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m index b981938a05bfc..ae4425d9dd322 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m +++ b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m @@ -4,6 +4,7 @@ #import "AppDelegate.h" +#import "ContinuousTexture.h" #import "FlutterEngine+ScenariosTest.h" #import "ScreenBeforeFlutter.h" #import "TextPlatformView.h" @@ -50,7 +51,8 @@ - (BOOL)application:(UIApplication*)application @"--gesture-reject-eager" : @"platform_view_gesture_reject_eager", @"--gesture-accept" : @"platform_view_gesture_accept", @"--tap-status-bar" : @"tap_status_bar", - @"--text-semantics-focus" : @"text_semantics_focus" + @"--text-semantics-focus" : @"text_semantics_focus", + @"--platform-view-with-continuous-texture" : @"platform_view_with_continuous_texture" }; __block NSString* flutterViewControllerTestName = nil; [launchArgsMap @@ -69,6 +71,10 @@ - (BOOL)application:(UIApplication*)application } [self.window makeKeyAndVisible]; + if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--with-continuous-texture"]) { + [ContinuousTexture + registerWithRegistrar:[self registrarForPlugin:@"com.constant.firing.texture"]]; + } return [super application:application didFinishLaunchingWithOptions:launchOptions]; } diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.h b/testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.h new file mode 100644 index 0000000000000..996de850caa09 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.h @@ -0,0 +1,20 @@ +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +// A texture plugin that ready textures continuously. +@interface ContinuousTexture : NSObject + +@end + +// The testing texture used by |ContinuousTexture| +@interface FlutterScenarioTestTexture : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.m b/testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.m new file mode 100644 index 0000000000000..0211062a283b5 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/Scenarios/ContinuousTexture.m @@ -0,0 +1,43 @@ +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ContinuousTexture.h" + +@implementation ContinuousTexture + ++ (void)registerWithRegistrar:(nonnull NSObject*)registrar { + NSObject* textureRegistry = [registrar textures]; + FlutterScenarioTestTexture* texture = [[FlutterScenarioTestTexture alloc] init]; + int64_t textureId = [textureRegistry registerTexture:texture]; + [NSTimer scheduledTimerWithTimeInterval:0.05 + repeats:YES + block:^(NSTimer* _Nonnull timer) { + [textureRegistry textureFrameAvailable:textureId]; + }]; +} + +@end + +@implementation FlutterScenarioTestTexture + +- (CVPixelBufferRef _Nullable)copyPixelBuffer { + return [self pixelBuffer]; +} + +- (CVPixelBufferRef)pixelBuffer { + NSDictionary* options = @{ + // This key is required to generate SKPicture with CVPixelBufferRef in metal. + (NSString*)kCVPixelBufferMetalCompatibilityKey : @YES + }; + CVPixelBufferRef pxbuffer = NULL; + CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault, 200, 200, kCVPixelFormatType_32BGRA, + (__bridge CFDictionaryRef)options, &pxbuffer); + + NSParameterAssert(status == kCVReturnSuccess && pxbuffer != NULL); + + CVPixelBufferLockBaseAddress(pxbuffer, 0); + return pxbuffer; +} + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m index 1d23e3a064378..24419a649910b 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m @@ -4,6 +4,8 @@ #import "GoldenPlatformViewTests.h" +static const NSInteger kSecondsToWaitForPlatformView = 30; + @interface PlatformViewUITests : GoldenPlatformViewTests @end @@ -170,4 +172,35 @@ - (void)testPlatformView { XCUIDevice.sharedDevice.orientation = UIDeviceOrientationLandscapeLeft; [self checkGolden]; } + +@end + +@interface PlatformViewWithContinuousTexture : XCTestCase + +@end + +@implementation PlatformViewWithContinuousTexture + +- (void)setUp { + self.continueAfterFailure = NO; +} + +- (void)testPlatformViewWithContinuousTexture { + XCUIApplication* app = [[XCUIApplication alloc] init]; + app.launchArguments = + @[ @"--platform-view-with-continuous-texture", @"--with-continuous-texture" ]; + [app launch]; + + XCUIElement* platformView = app.textViews.firstMatch; + BOOL exists = [platformView waitForExistenceWithTimeout:kSecondsToWaitForPlatformView]; + if (!exists) { + XCTFail(@"It took longer than %@ second to find the platform view." + @"There might be issues with the platform view's construction," + @"or with how the scenario is built.", + @(kSecondsToWaitForPlatformView)); + } + + XCTAssertNotNil(platformView); +} + @end diff --git a/testing/scenario_app/lib/src/platform_view.dart b/testing/scenario_app/lib/src/platform_view.dart index 90fc0693e0433..964ec36d8d510 100644 --- a/testing/scenario_app/lib/src/platform_view.dart +++ b/testing/scenario_app/lib/src/platform_view.dart @@ -613,6 +613,23 @@ class PlatformViewForTouchIOSScenario extends Scenario } } +/// A simple platform view for testing platform view with a continuous texture layer. +/// For example, it simulates a video being played. +class PlatformViewWithContinuousTexture extends PlatformViewScenario { + /// Constructs a platform view with continuous texture layer. + PlatformViewWithContinuousTexture(PlatformDispatcher dispatcher, String text, { int id = 0 }) + : super(dispatcher, text, id: id); + + @override + void onBeginFrame(Duration duration) { + final SceneBuilder builder = SceneBuilder(); + + builder.addTexture(0, width: 300, height: 300, offset: const Offset(200, 200)); + + finishBuilderByAddingPlatformViewAndPicture(builder, id); + } +} + mixin _BasePlatformViewScenarioMixin on Scenario { int _textureId; diff --git a/testing/scenario_app/lib/src/scenarios.dart b/testing/scenario_app/lib/src/scenarios.dart index 6aa553380d34c..aa7f5298b5d50 100644 --- a/testing/scenario_app/lib/src/scenarios.dart +++ b/testing/scenario_app/lib/src/scenarios.dart @@ -43,6 +43,7 @@ Map _scenarios = { 'tap_status_bar': () => TouchesScenario(window), 'text_semantics_focus': () => SendTextFocusScemantics(window), 'initial_route_reply': () => InitialRouteReply(window), + 'platform_view_with_continuous_texture': () => PlatformViewWithContinuousTexture(PlatformDispatcher.instance, 'Platform View', id: _viewId++), }; Map _currentScenarioParams = {}; From 701babd31999ea01a0bb99811a62823f978af8d5 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 8 Dec 2020 11:11:04 -0800 Subject: [PATCH 2/3] fix cp mistake --- testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m | 1 - 1 file changed, 1 deletion(-) diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m index ae4425d9dd322..6d5de9abd13f1 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m +++ b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m @@ -51,7 +51,6 @@ - (BOOL)application:(UIApplication*)application @"--gesture-reject-eager" : @"platform_view_gesture_reject_eager", @"--gesture-accept" : @"platform_view_gesture_accept", @"--tap-status-bar" : @"tap_status_bar", - @"--text-semantics-focus" : @"text_semantics_focus", @"--platform-view-with-continuous-texture" : @"platform_view_with_continuous_texture" }; __block NSString* flutterViewControllerTestName = nil; From 315cf41b548618c7a207866e17d85d77f701d5b8 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 8 Dec 2020 11:32:17 -0800 Subject: [PATCH 3/3] fix ci --- testing/scenario_app/lib/src/platform_view.dart | 4 ++-- testing/scenario_app/lib/src/scenarios.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/scenario_app/lib/src/platform_view.dart b/testing/scenario_app/lib/src/platform_view.dart index 964ec36d8d510..3739d1c504604 100644 --- a/testing/scenario_app/lib/src/platform_view.dart +++ b/testing/scenario_app/lib/src/platform_view.dart @@ -617,8 +617,8 @@ class PlatformViewForTouchIOSScenario extends Scenario /// For example, it simulates a video being played. class PlatformViewWithContinuousTexture extends PlatformViewScenario { /// Constructs a platform view with continuous texture layer. - PlatformViewWithContinuousTexture(PlatformDispatcher dispatcher, String text, { int id = 0 }) - : super(dispatcher, text, id: id); + PlatformViewWithContinuousTexture(Window window, String text, { int id = 0 }) + : super(window, text, id: id); @override void onBeginFrame(Duration duration) { diff --git a/testing/scenario_app/lib/src/scenarios.dart b/testing/scenario_app/lib/src/scenarios.dart index aa7f5298b5d50..f1811313e1baf 100644 --- a/testing/scenario_app/lib/src/scenarios.dart +++ b/testing/scenario_app/lib/src/scenarios.dart @@ -43,7 +43,7 @@ Map _scenarios = { 'tap_status_bar': () => TouchesScenario(window), 'text_semantics_focus': () => SendTextFocusScemantics(window), 'initial_route_reply': () => InitialRouteReply(window), - 'platform_view_with_continuous_texture': () => PlatformViewWithContinuousTexture(PlatformDispatcher.instance, 'Platform View', id: _viewId++), + 'platform_view_with_continuous_texture': () => PlatformViewWithContinuousTexture(window, 'Platform View', id: _viewId++), }; Map _currentScenarioParams = {};