mirror of
https://github.com/rustdesk/rustdesk
synced 2026-05-23 17:09:40 +00:00
testing bad rendering of mac
This commit is contained in:
parent
67a210f9a4
commit
620fe81017
2 changed files with 10 additions and 0 deletions
|
|
@ -75,6 +75,15 @@ export function draw(frame) {
|
|||
gl.readPixels(0, 0, canvas.width, canvas.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ if (app) {
|
|||
<div id="canvas" style="display: none;">
|
||||
<button id="cancel" onclick="cancel();">Cancel</button>
|
||||
<canvas id="player"></canvas>
|
||||
<canvas id="test-yuv-decoder-canvas"></canvas>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue