javascript - Speed up drawing image in canvas -


i have draw multiple images on 1 canvas. make program works, though, have speed display. see images appear 1 one:

var ctx = document.getelementbyid('images_tiles').getcontext('2d'); function handler() {     var = this.i;     ctx.drawimage(this.img_src, this.r * tilesize, this.c*tilesize,  tilesize * tilelist[i].qw, tilesize * tilelist[i].qh); }   //draw tiles in spiral (i=0; i<tilelist.length; i++) {     var o = { img_src: new image, c: tilelist[i].y, r: tilelist[i].x, i: };     o.img_src.onload = handler.bind(o);     o.img_src.src =  './viewer/images/'+path+'/lod'+glod+'/tiles_'+ o.c + '_' + o.r +'.jpeg'; } 

i see webworker can make parallelization not display. have solution or/and trick.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -