remove tiny-skia and replace chunk renderer with a GPU-based one
This commit is contained in:
parent
39632f56a7
commit
b4c3260f49
10 changed files with 253 additions and 434 deletions
|
@ -146,6 +146,7 @@ function readUrl(urlString) {
|
|||
}
|
||||
|
||||
let currentUser = wall.onlineUsers.getUser(session.sessionId);
|
||||
let chunkAllocator = canvasRenderer.atlasAllocator;
|
||||
|
||||
// Event loop
|
||||
|
||||
|
@ -214,15 +215,13 @@ function readUrl(urlString) {
|
|||
updatePromises.push(
|
||||
createImageBitmap(blob).then((bitmap) => {
|
||||
let chunk = wall.mainLayer.getOrCreateChunk(
|
||||
chunkAllocator,
|
||||
info.position.x,
|
||||
info.position.y,
|
||||
);
|
||||
if (chunk == null) return;
|
||||
|
||||
chunk.ctx.globalCompositeOperation = "copy";
|
||||
chunk.ctx.drawImage(bitmap, 0, 0);
|
||||
chunk.syncToPixmap();
|
||||
chunk.markModified();
|
||||
chunk.upload(chunkAllocator, bitmap);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue