diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h b/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h index adbc6cfe9a6c3..f414e35ef7696 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h @@ -20,16 +20,13 @@ * * The implementation of this method should create a new `NSView`. * - * @param frame The rectangle for the newly created view measured in points. * @param viewId A unique identifier for this view. * @param args Parameters for creating the view sent from the Dart side of the * Flutter app. If `createArgsCodec` is not implemented, or if no creation arguments were sent from * the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as * decoded by `createArgsCodec`. */ -- (nonnull NSView*)createWithFrame:(CGRect)frame - viewIdentifier:(int64_t)viewId - arguments:(nullable id)args; +- (nonnull NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args; /** * Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`. diff --git a/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositor.mm b/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositor.mm index eb44bf0b43080..e1bcf9bab1f6b 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositor.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositor.mm @@ -107,6 +107,7 @@ void FlutterMetalCompositor::PresentPlatformView(const FlutterLayer* layer, size_t layer_position) { // TODO (https://github.com/flutter/flutter/issues/96668) + // once the issue is fixed, this check will pass. FML_DCHECK([[NSThread currentThread] isMainThread]) << "Must be on the main thread to present platform views"; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm index 153367251cbdf..1bdae16115dcf 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm @@ -44,7 +44,7 @@ - (void)onCreateWithViewID:(int64_t)viewId return; } - NSView* platform_view = [factory createWithFrame:CGRectZero viewIdentifier:viewId arguments:nil]; + NSView* platform_view = [factory createWithviewIdentifier:viewId arguments:nil]; _platformViews[viewId] = platform_view; result(nil); } diff --git a/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm b/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm index a874c755bf621..7f3ade5f1e06e 100644 --- a/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm +++ b/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm @@ -17,10 +17,8 @@ - (instancetype)initWithFrame:(CGRect)frame { @end @implementation TestFlutterPlatformViewFactory -- (NSView*)createWithFrame:(CGRect)frame - viewIdentifier:(int64_t)viewId - arguments:(nullable id)args { - return [[TestFlutterPlatformView alloc] initWithFrame:frame]; +- (NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args { + return [[TestFlutterPlatformView alloc] initWithFrame:CGRectZero]; } - (NSObject*)createArgsCodec {