Swiper slider animation + SVG mask transform performance issues only on RETINA display

491 Views Asked by At

I need help with animation performance on RETINA display

I have a swiper slider and on slideTranasitionStart I'm animating a mask (covering the whole slider).

Codepen link here.

The animation is very smooth in all browsers. I'm using an external monitor for work but as soon as I drag the browser window to my retina display (MacBook Pro -Retina, 13-inch, Early 2015, macOS Mojave) the animation looks is very laggy (lowest fps is around 5-6!) !

I tried 2 main options to do the animation:

Adding classes to transform the mask (and only using the most performant css properties transform and opacity on the animated elements). For this option I tried adding will-change property on the animated elements, I replaced translateX with translate3d, I only added transition on the transform property. Using greensock morphSVG plugin to achieve the transforming of the mask (in the codepen demo I'm using this option as it's way less code) Unfortunately both options are still laggy on retina display.

Nothing seems to improve the performance on the retina display and I'm running out of options.

I'd be very grateful if someone can help out!

Thank you

0

There are 0 best solutions below