Commit f1beeb08 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

add a preserveImages prop that allows the (iOS) impl to keep images

parent cb37fd45
......@@ -9,6 +9,7 @@
@property (nonatomic) BOOL autoRedraw;
@property (nonatomic) BOOL eventsThrough;
@property (nonatomic) BOOL visibleContent;
@property (nonatomic) BOOL preserveImages;
@property (nonatomic) NSNumber *nbContentTextures;
@property (nonatomic) NSNumber *renderId;
@property (nonatomic) NSNumber *pixelRatio;
......
......@@ -183,7 +183,10 @@ RCT_NOT_IMPLEMENTED(-init)
@autoreleasepool {
NSDictionary *prevImages = _images;
NSMutableDictionary *images = [[NSMutableDictionary alloc] init];
NSMutableDictionary *images =
self.preserveImages
? _images.mutableCopy
: [[NSMutableDictionary alloc] init];
GLRenderData * (^traverseTree) (GLData *data);
__block __weak GLRenderData * (^weak_traverseTree)(GLData *data);
......
......@@ -25,6 +25,7 @@ RCT_EXPORT_MODULE();
RCT_EXPORT_VIEW_PROPERTY(nbContentTextures, NSNumber);
RCT_EXPORT_VIEW_PROPERTY(autoRedraw, BOOL);
RCT_EXPORT_VIEW_PROPERTY(preserveImages, BOOL);
RCT_EXPORT_VIEW_PROPERTY(data, GLData);
RCT_EXPORT_VIEW_PROPERTY(renderId, NSNumber);
RCT_EXPORT_VIEW_PROPERTY(pixelRatio, NSNumber);
......@@ -52,7 +53,7 @@ RCT_EXPORT_METHOD(capture: (nonnull NSNumber *)reactTag withConfig:(id)config)
GLCanvas * v;
v = [[GLCanvas alloc] initWithBridge:self.bridge];
return v;
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment