simpleperf/report_html.js
// Return a promise to draw views.
Return a promise to draw views.
Return a promise to draw views .
function drawViewsAsync(views, totalProgress, drawViewCallback) {
    if (views.length == 0) {
        return createPromise();
    }
    let drawPos = 0;
    let eachProgress = totalProgress / views.length;
    function drawAsync() {
        if (drawPos == views.length) {
            return createPromise();
        }
        return drawViewCallback(views[drawPos++], eachProgress).then(drawAsync);
    }
    return drawAsync();
}
function drawViewsAsync ( views , totalProgress , drawViewCallback ) { if ( views . length == 0 ) { return createPromise ( ) ; } let drawPos = 0 ; let eachProgress = totalProgress / views . length ; function drawAsync ( ) { if ( drawPos == views . length ) { return createPromise ( ) ; } return drawViewCallback ( views [ drawPos ++ ] , eachProgress ) . then ( drawAsync ) ; } return drawAsync ( ) ; }
Return a promise to draw views.
Return a promise to draw views .