mirror of
https://github.com/chjj/blessed.git
synced 2026-02-06 11:56:54 +00:00
optimize tng for disposeOp=2.
This commit is contained in:
parent
d2a2847506
commit
1d05e3d265
18
vendor/tng.js
vendored
18
vendor/tng.js
vendored
@ -932,14 +932,18 @@ PNG.prototype.renderFrame = function(bmp, frame, i) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._lastBmp = [];
|
if (frame.fctl.disposeOp === 2) {
|
||||||
for (y = 0; y < frame.fctl.height; y++) {
|
this._lastBmp = [];
|
||||||
line = [];
|
for (y = 0; y < frame.fctl.height; y++) {
|
||||||
for (x = 0; x < frame.fctl.width; x++) {
|
line = [];
|
||||||
p = this._curBmp[yo + y][xo + x];
|
for (x = 0; x < frame.fctl.width; x++) {
|
||||||
line.push({ r: p.r, g: p.g, b: p.b, a: p.a });
|
p = this._curBmp[yo + y][xo + x];
|
||||||
|
line.push({ r: p.r, g: p.g, b: p.b, a: p.a });
|
||||||
|
}
|
||||||
|
this._lastBmp.push(line);
|
||||||
}
|
}
|
||||||
this._lastBmp.push(line);
|
} else {
|
||||||
|
this._lastBmp = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (y = 0; y < frame.fctl.height; y++) {
|
for (y = 0; y < frame.fctl.height; y++) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user