Posts

Post not yet marked as solved
0 Replies
137 Views
I am creating an image using the following code: UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat preferredFormat]; fomat.opaque = false; NSError *error = nil; UIImage *image = nil; [[[UIGraphicsImageRenderer alloc] initWithSize:size format:format] runDrawingActions:^(UIGraphicsImageRendererContext *rendererContext) { //...issue drawing commands into UIGraphicsGetCurrentContext() } completionActions:^(UIGraphicsImageRendererContext *rendererContext) { image = rendererContext.currentImage; } error:&error]; When executing the line: image = rendererContext.currentImage; I'm seeing a call stack leading to vImageConvert_AnyToAny: If I understand correctly, an image format conversion is occurring, which is unexpected as I am trying to draw in the device's native format. Are there any workarounds? Or maybe it is the expected behavior and the conversion does not impact performance in any way?
Posted
by AlexDS1.
Last updated
.
Post not yet marked as solved
0 Replies
273 Views
I'm trying to synchronize contents of a Metal layer with UIView animations (CAAnimation-based). I've tried using custom CALayer animations by overriding the needsDisplay and action(forKey:) methods of CAMetalLayer, setting presentsWithTransaction to true, then performing a change inside a CATransaction. This works, but when animating a UIView and the contents of a CAMetalLayer side by side, the Metal contents slightly lags behind the UIView. Is there any way to perfectly synchronize the app-side animated drawing with render server-side animations?
Posted
by AlexDS1.
Last updated
.
Post not yet marked as solved
0 Replies
335 Views
I've built and activated a custom toolchain. Build logs confirm that the custom swift compiler is being used. However, it doesn't work with the new (preview) build system. Build logs still show the correct "export TOOLCHAINS=..." line, but then it uses swift from "XcodeDefault.xctoolchain".The only difference I see is that the new build system adds an additional environment variable:export SWIFTC="Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1) Target: x86_64-apple-darwin17.4.0"Is it a current limiration of the new build system?
Posted
by AlexDS1.
Last updated
.