mirror of
https://github.com/rive-app/rive-ios.git
synced 2026-01-18 17:11:28 +01:00
Diffs= cf89553e9 Remove files to unblock downstream iOS push (#7500) 1adf3dbf4 disable fallback font during artboard rendering (#7480) 6f29a9c0c Miscellaneous Layout UX Fixes (#7491) 09ccc9ebb Add yoga to thumbnail generator build (#7494) aa390d5dc change how viewmodel instances target their viewmodel (#7468) e66e242c6 Xxxx databinding add boolean (#7456) 9cd8759a0 Xxxx data binding data context (#7454) 31f5ee5c4 Animation for Layouts (#7426) a4439ee42 Renames for Yoga and libjpeg (#7446) 97578005c Update LayoutComponentStyle bitfields to be compatible with older C++ versions (#7436) 75823467d databinding (#7341) ef9ef9fd1 Ios golden test (#7413) Co-authored-by: Jonathon Copeland <jcopela4@gmail.com> Co-authored-by: Philip Chung <philterdesign@gmail.com>
38 lines
847 B
Objective-C
38 lines
847 B
Objective-C
/*
|
|
* Copyright 2023 Rive
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef render_context_h
|
|
#define render_context_h
|
|
|
|
#import <MetalKit/MetalKit.h>
|
|
#import <Metal/Metal.h>
|
|
|
|
namespace rive
|
|
{
|
|
class Factory;
|
|
class Renderer;
|
|
}; // namespace rive
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class MTKView;
|
|
|
|
/// RenderContext knows how to set up a backend-specific render context (e.g., Skia, CG, Rive, ...),
|
|
/// and provides a rive::Factory and rive::Renderer for it.
|
|
@interface RenderContext : NSObject
|
|
@property(strong) id<MTLDevice> metalDevice;
|
|
@property(strong) id<MTLCommandQueue> metalQueue;
|
|
@property MTLPixelFormat depthStencilPixelFormat;
|
|
@property BOOL framebufferOnly;
|
|
- (rive::Factory*)factory;
|
|
- (rive::Renderer*)beginFrame:(MTKView*)view;
|
|
- (void)endFrame:(MTKView*)view withCompletion:(_Nullable MTLCommandBufferHandler)completionHandler;
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif
|