diff options
Diffstat (limited to 'tests/cocoa/display.m')
| -rw-r--r-- | tests/cocoa/display.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cocoa/display.m b/tests/cocoa/display.m new file mode 100644 index 0000000..0b2d9d8 --- /dev/null +++ b/tests/cocoa/display.m @@ -0,0 +1,13 @@ +#import <AppKit/AppKit.h> +#include "common/private_native.h" + +@interface NSView (YaslTestDisplayLink) +- (void)displayLinkFired:(id)link; +@end + +/* Exercise the native CPU presenter without depending on the host's cadence. */ +void yasl_test_frame_tick(struct yasl_surface *surface) +{ + NSWindow *window = (NSWindow *)yasl_private_surface_get_native_handle(surface); + [window.contentView displayLinkFired:nil]; +} |
