react-native-skia
react-native-skia copied to clipboard
clip path of Group component cause glitch on rerender.
Description
adding path
to clip
props of Group
component cause glitch on canvas
when rerender. I tested in two versions both cause the bug.
OS: Android
devices ( doesn't cause glitches in the android emulator)
- Redmi Note 7 Pro.
- Xiaomi Mi9
- Samsung S8+
- Samsung Note 10+
- Samsung Fold 4 (only on the outer screen)
Version
0.1.156, 0.1.157
Steps to reproduce
https://github.com/kyimoemin/skiaTest
Snack, code example, screenshot, or link to a repository
We were not able to reproduce the example on android real device. We also tried on iOS and Web. Can you try with another android device to check if the bug also appear there with the exact same project?
I think it only happens on some specific Android devices not happen in iOS, not sure about Web tho. in my case, it is Redmi Note 7 pro. One of my coworker face that bug too I'll update you soon after I ask him for the device info
@wcandillon I updated the devices list
the glitch also happen some component that doesn't use clip-path
I have managed to reproduce this issue on 2 pixel devices as well (Pixel 3XL and Pixel 4XL). We are using a <Group>
tag with the clip being an SkRect
and outside the clipping area it renders parts of the canvas in a tiling manner. We have a list of paths we're adding from user input and every one we add alters the broken rendering
Thanks for reporting this @daentech We have this example already: https://github.com/kyimoemin/skiaTest/blob/master/App.js Just in case, it sounds like you may have an even smaller example you could link here so we can test it as well? I am planning on getting one of these devices.
hi @kyimoemin , @wcandillon any solution as I am getting similar issue, it seems that when you increase the padding, the canvas renders items multiple times. getting this bug in android
I just change to react native svg lib.
@kyimoemin , nice and easy fix mate :D
having the same truoble, it happens to me when using expo bare and running with expo go app, running natively on android seems to be ok