It's a longstanding problem that reading data back from the GPU, especially in WebGL and especially in Chrome, is slow due to Chrome's deep graphics pipeline, which is both multithreaded and multi-process.
Applications that have attempted to use primitives like readPixels have been stymied because issuing even a single 1x1 readPixel call per frame can completely destroy the performance characteristics of the application.
ES 3.0 and WebGL 2.0 introduce enough primitives to allow asynchronous, server-side readback of data, for example using pixel buffer objects. However, getting data out of these buffer objects is still a synchronous operation, via getBufferSubData ( https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3 ).
We'd like to prototype a getBufferSubDataAsync which returns a Promise, where the success callback receives a newly-allocated ArrayBuffer. This should eliminate all synchronous calls in fetching data back from the GPU.
Comment 1 by vmi...@chromium.org
, Jun 1 2016