-
Notifications
You must be signed in to change notification settings - Fork 6k
WIP: Smooth window resizing on macOS #21252
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,35 +4,40 @@ | |
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
/** | ||
* Listener for view resizing. | ||
*/ | ||
@protocol FlutterViewReshapeListener <NSObject> | ||
@protocol FlutterViewDelegate <NSObject> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we call this |
||
/** | ||
* Called when the view's backing store changes size. | ||
*/ | ||
- (void)viewDidReshape:(nonnull NSView*)view; | ||
|
||
- (void)scheduleOnRasterTread:(nonnull dispatch_block_t)block; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo: "RasterThread". Also, given that the embedder method is called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about this. Apart from |
||
|
||
@end | ||
|
||
/** | ||
* View capable of acting as a rendering target and input source for the Flutter | ||
* engine. | ||
*/ | ||
@interface FlutterView : NSOpenGLView | ||
@interface FlutterView : NSView | ||
|
||
@property(readwrite, nonatomic, nonnull) NSOpenGLContext* openGLContext; | ||
|
||
- (nullable instancetype)initWithFrame:(NSRect)frame | ||
shareContext:(nonnull NSOpenGLContext*)shareContext | ||
reshapeListener:(nonnull id<FlutterViewReshapeListener>)reshapeListener | ||
delegate:(nonnull id<FlutterViewDelegate>)delegate | ||
NS_DESIGNATED_INITIALIZER; | ||
|
||
- (nullable instancetype)initWithShareContext:(nonnull NSOpenGLContext*)shareContext | ||
reshapeListener: | ||
(nonnull id<FlutterViewReshapeListener>)reshapeListener; | ||
delegate:(nonnull id<FlutterViewDelegate>)delegate; | ||
|
||
- (nullable instancetype)initWithFrame:(NSRect)frameRect | ||
pixelFormat:(nullable NSOpenGLPixelFormat*)format NS_UNAVAILABLE; | ||
- (nonnull instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE; | ||
- (nullable instancetype)initWithCoder:(nonnull NSCoder*)coder NS_UNAVAILABLE; | ||
- (nonnull instancetype)init NS_UNAVAILABLE; | ||
|
||
- (void)start; | ||
- (void)present; | ||
- (int)getFrameBufferIdForWidth:(int)width height:(int)height; | ||
|
||
@end |
Uh oh!
There was an error while loading. Please reload this page.