testing bad rendering of mac
This commit is contained in:
parent
67a210f9a4
commit
620fe81017
@ -75,6 +75,15 @@ export function draw(frame) {
|
|||||||
gl.readPixels(0, 0, canvas.width, canvas.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
|
gl.readPixels(0, 0, canvas.width, canvas.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
|
||||||
console.log(new Date().getTime() - now);
|
console.log(new Date().getTime() - now);
|
||||||
}
|
}
|
||||||
|
var testCanvas = document.getElementById("test-yuv-decoder-canvas");
|
||||||
|
if (testCanvas && currentFrame) {
|
||||||
|
var ctx = testCanvas.getContext("2d");
|
||||||
|
testCanvas.width = frame.format.displayWidth;
|
||||||
|
testCanvas.height = frame.format.displayHeight;
|
||||||
|
var img = ctx.createImageData(testCanvas.width, testCanvas.height);
|
||||||
|
img.data.set(currentFrame);
|
||||||
|
ctx.putImageData(img, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sendOffCanvas(c) {
|
export function sendOffCanvas(c) {
|
||||||
|
@ -24,6 +24,7 @@ if (app) {
|
|||||||
<div id="canvas" style="display: none;">
|
<div id="canvas" style="display: none;">
|
||||||
<button id="cancel" onclick="cancel();">Cancel</button>
|
<button id="cancel" onclick="cancel();">Cancel</button>
|
||||||
<canvas id="player"></canvas>
|
<canvas id="player"></canvas>
|
||||||
|
<canvas id="test-yuv-decoder-canvas"></canvas>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user