mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-07-24 09:53:46 +00:00

Instead of copying and sending image buffers to JavaScript, the WASM module now draws into the canvas by itself. This removes some overhead associated with the previous approach and open the door for further optimizations. In order to achieve good performance, the newest API of `softbuffer@0.3.0` is used: the "owned buffer" that can be written into by us with direct access and `present_with_damage` to apply partial updates. The presentation itself is currently not yet "no-copy" in the case of the web backend because the current API of `softbuffer` is expecting a pixel buffer in the BGRX format while the underlying canvas can only takes RGBA pixels. There is an open issue for this. There was a bug with the `present_with_damage` implementation for the web backend. I fixed the issue and opened a PR to upstream the patch. The cargo dependency patch will be removed once the fix is published on crates.io. Issue: ARC-164
21 lines
465 B
JavaScript
21 lines
465 B
JavaScript
import adapter from '@sveltejs/adapter-static';
|
|
import preprocess from 'svelte-preprocess';
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://github.com/sveltejs/svelte-preprocess
|
|
// for more information about preprocessors
|
|
preprocess: preprocess(),
|
|
|
|
kit: {
|
|
adapter: adapter({
|
|
pages: 'build/browser',
|
|
assets: 'build/browser',
|
|
fallback: null,
|
|
precompress: false,
|
|
strict: true
|
|
})
|
|
}
|
|
};
|
|
|
|
export default config;
|