Blitmark is a project mainly written in JavaScript, it's free.
A Benchmark for different methods of drawing an image to a Canvas
A Benchmark for different methods of drawing an image to a canvas
Each example should provide three methods
beforeFrame()
drawSprite(Canvas canvas, Image img, int x, int y)
afterFrame()
The images will be preloaded.
Uses the context's drawImage
method.
This honors transparency.
Uses putImageData but honors transparency, by combining with the background in js.
Doesn't actually draw the image, but draws a placeholder rect. Doesn't honor transparency.
Uses putImageData. Doesn't honor transparency.
Draws to a buffer, blitting ONLY the non-transparent pixels.