Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARTSurfaceViewShadowNode: redraw itself if the host resumed the execu…
…tion Starting on API level 25, Android will destroy the TextureView's TextureLayer when the an app is sent to the background and automatically create a new one once the TextureView is drawed again. This causes a problem for ARTSurfaceView, because this component does not draw itself and the Android API explicitly forbids to do such action. Since there's no listeners available to know when the new TextureLayer was created, the ARTSufurfaceViewShadowNode will listen for life cycle events and redraw its children once the activity is resumed. It's was also discussed that ARTSurfaceView should extends SurfaceView and not TextureView, however this may introduce two problems: * SurfaceView is not hardware accelerated, which may cause impact on performance * SurfaceView does not support opacity, so it will be impossible to set the ARTSufraceView as transparent With this problems in mind, this commit keeps the ARTSurfaceView extending TextureView. Fixes facebook#17565
- Loading branch information