[Android] Images in ScrollView gets black flickers
vignesarul opened this issue · comments
bug report
library version
├── gl-react@3.14.0
└── gl-react-native@3.14.0
Expected behavior
Actual behavior
Steps to reproduce the behavior
- Create a component like this on react native: https://gl-react-cookbook.surge.sh/helloblue
- With in react-native's horizontal ScrollView, add few instance of the component created in step 1
- Swipe the images
Workaround solution for this issue is,
- Render the image within gl-react-native's Surface.
- Use Surface's captureFrame method to capture the frame as base64. https://github.com/gre/gl-react-v2/blob/master/docs/api/Surface.md#captureframeconfig.
- Use reactnative's Image component to render the base64 image string. Now scroll doesn't produce flickering effect.
@vignesarul How to solve it? I have now loaded 8 filters in the scrollView, but there will always be a black one.
@songxiaoliang I don't know why you are getting a separate black image.
Rendering surface/canvas from gl-react within react-native's scrollView creates black flickers while swiping. I used surface's captureFrame method to get base64 of filter applied image & render it as a normal image in scrollView.
@vignesarul What's more serious is that it will cause the App to be stuck, page switching will not be smooth, and even a crash will occur. Do you have any good solutions?
Please check on latest implementation (v4), this should be fixed. if not we can reopen and i would need a minimal reproductible example.
thanks