Hello,
I am using the system WebView (android.webkit.WebView) and drawing its content to a SurfaceTexture overriding the dispatchDraw method and using the SurfaceTexture canvas instead of the one provided in the call. Then the SurfaceTexture is used to render the content of the webview in a OpenGL fragment shader using the external image texture extension.
Everything works fine but I when a page contains a video or a canvas (2D or webgl) am not able to see them. If I make the call to the regular super.dispatchDraw with the provided canvas apart from the call to using the canvas from the SurfaceTexture, I am able to render the WebView on top of the GLSurfaceView and I can see that the webview is correctly rendering the videos and canvases, but they never get to the SurfaceTexture for some reason. Other devs have been experiencing the same issue over the internet according to my search.
Am I doing something wrong? Is it possible to render the canvas and videos somehow using the system webview in Android 7.1.1 (based on Chromium)?
Thank you very much in advance.
NOTE: A fun fact is that if I create a canvas in my page and do not change its size and render using the 2d context, the canvas is shown in the SurfaceTexture! But if I change the canvas to any other size or get the webgl context from it, the canvas is no longer rendered in the surface texture.