SurfaceTexture’s onFrameAvailable() method always called too late
The way SurfaceTexture works makes this a bit tricky to get right. The docs say the frame-available callback “is called on an arbitrary thread”. The SurfaceTexture class has a bit of code that does the following when initializing (line 318): if (this thread has a looper) { handle events on this thread } else if … Read more