YuAo / YUDisplacementTransition

A GPU accelerated transition library makes use of displacement maps to create distortion effects.
MIT License
138 stars 11 forks source link

memory jumps #2

Open alyfreym opened 5 years ago

alyfreym commented 5 years ago

Hi, I noticed if using images with different aspect ratios, during transitions there are sharp jumps in memory from 500 mb to 1 gb,I would like to correct this a little, you can tell me, this is due to inconsistencies of the aspect ratios? because you have this check in the code assert(abs(Double(image.width)/Double(image.height) - Double(targetImage.width)/Double(targetImage.height)) < 0.01)

YuAo commented 5 years ago

I don't quite understand your situation here. But the context may cache some unneeded resources if the render size changes a lot. Try context.reclaimResources() after each context.render(....).