mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
don't erase the surface before blitting.
It's done at HTML level with canvas.clearRect() BUG=webp:261 Change-Id: I83c73791f5922cd1f426f19faf856fa1cf8f0311
This commit is contained in:
@ -21,8 +21,11 @@ function init() {
|
||||
|
||||
function decode(webp_data, canvas_id) {
|
||||
// get the canvas to decode into
|
||||
Module.canvas = document.getElementById(canvas_id);
|
||||
if (Module.canvas == null) return;
|
||||
var canvas = document.getElementById(canvas_id);
|
||||
if (canvas == null) return;
|
||||
// clear previous picture (if any)
|
||||
Module.canvas = canvas;
|
||||
canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height);
|
||||
// decode and measure timing
|
||||
start = new Date();
|
||||
var ret = WebpToCanvas(webp_data, webp_data.length);
|
||||
|
Reference in New Issue
Block a user