Commit Graph

74 Commits

Author SHA1 Message Date
mattmcclaskey 419a3a70e9
WIP - multi monitor refactor 2023-09-08 13:12:28 -04:00
Matt McClaskey d83f94c886
Transparent Rect Type (#58)
* implement new transparent rect encoding
* implement a max frame hold time
---------

Co-authored-by: Lauri Kasanen <cand@gmx.com>
Co-authored-by: mattmcclaskey <matt@kasmweb.com>
2023-03-01 11:18:59 -05:00
Matt McClaskey 437830d497
Feature/kasm 3380 udp frame (#46)
* Handle the frame id in udp packets

* refactor udp message buffer, add frame_id and rect cnt

* refactor udp to work with new display.js

* additional debug metrics, clear frame buffer on transitions tcp/udp

* fix udp with display refactor, KASM-3541 cancelAnimationFrame

Co-authored-by: Lauri Kasanen <cand@gmx.com>
Co-authored-by: mattmcclaskey <matt@kasmweb.com>
2022-11-11 09:31:16 -05:00
Matt McClaskey 9f240fc7b1
Major refactor of display class, support for QOI (#43)
* Major refactor of display.js queue to assume async rect processing in order to accommodate threaded decode or udp

* QOI lossless decoder on worker threads using WASM

* rfb.js class to provide frame_id and rect counts per frame

Co-authored-by: ryan.kuba <ryan.kuba@kasmweb.com>
Co-authored-by: matt <matt@kasmweb.com>
2022-11-02 07:01:54 -04:00
Matt McClaskey 9a95983382
KASM-3367 Refactor display.js, direct to visible canvas (#40)
* refactor display.js, remove non-visible canvas and concept of damage

* tweaks to UDP transitions

* Update testing readme

Co-authored-by: matt <matt@kasmweb.com>
Co-authored-by: matt mcclaskey <matt@kamsweb.com>
2022-10-14 15:07:57 -04:00
Matt McClaskey 5a8d8f24b4
Udp Initial MVP (#32)
* Initial UDP code

* refactored UDP reassembly

* WIP Added udp decoder

* WIP cleanup

* Port multiplexing

* UDP upgrade/downgrade

* UDP packets now have a hash

* Correct udp.js this.numColors bug

* auto upgrade to udp

* re-apply webpack

* Code cleanup, optimize clearing udpBuffer

Co-authored-by: Lauri Kasanen <cand@gmx.com>
Co-authored-by: matt <matt@kasmweb.com>
2022-07-29 12:38:55 -04:00
mmcclaskey ad1fc1f06d
KASM-2152 fps added to stats (#25)
Co-authored-by: matt <matt@kasmweb.com>
2022-01-11 15:31:39 -05:00
mmcclaskey ce2cd26277
Bugfx/kasm 2090 resizing issues (#23)
* KASM-2090 work around for incomplete webp images when there are lots of concurrent users on a single session. Unknown root cause, work around will in most cases keep the connection alive.
2021-11-15 08:19:19 -05:00
mmcclaskey e11e76e2c7
Feature/kasm 2041 mobile scaling (#20)
* KASM-2041 auto scale high res mobile - Browsers typically set a scale ratio for high resolution screens, so everything isn't tiny. This mostly works well, but results in a super low resolution for the remote display. This feature detects low resolutions where the browser is doing scaling and adjusts the scale backwards to reach a more reasonable resolution. This typically only happens on modern phones.
2021-11-08 12:55:37 -05:00
matt a0907e9390 KASM-1834 added new anti-aliasing feature 2021-09-12 17:53:03 +00:00
mmcclaskey 6b283b2313
Update display.js 2021-09-10 13:41:03 -04:00
matt 4c8e8ef1e1 KASM-1834 disable anti-aliasing when screen ratio is 1:1 2021-09-10 17:31:44 +00:00
matt a814f0594f KASM-1834 high dpi screens blurry 2021-09-09 11:34:39 +00:00
Lauri Kasanen f9f5b01cc2 Initial frame stat tracking 2021-07-27 15:28:02 +03:00
matt ed0744497d fix for video mode resizing 2021-04-18 06:36:53 -04:00
Pierre Ossman 27496941a0 Remove createImageData() fallback
All our browsers should be new enough now that we can rely on the
ImageData constructor.
2020-12-07 10:10:53 +01:00
Pierre Ossman 5b5b747494 Remove many small, obsolete, old browser hacks
These are for browsers no longer supported anyway.
2020-12-07 10:10:53 +01:00
Pierre Ossman 0630352e19 Merge branch 'rgbx' of https://github.com/CendioOssman/noVNC 2020-09-04 13:40:23 +02:00
Pierre Ossman 97b86abc94 Avoid fractional pixel sizes from Display 2020-06-11 16:50:08 +02:00
Pierre Ossman 6a19390baa Switch to RGBx pixel format
This is what the browser wants so it avoids having to spend time
converting everything. Unfortunately it usually means the server instead
needs to convert it for us, but we assume it has more power than we do.
2020-06-08 07:57:17 +02:00
Pierre Ossman f5b5767c98 Standardise on a single blit function
Keep everything simpler by always blitting in the same pixel format.
It's up to the decoders to convert if they need to.
2020-06-08 07:53:41 +02:00
Pierre Ossman 224f95f997 Move tile handling to Hextile decoder
It is only used there so no need for it to be in the general
Display class.
2020-06-06 13:23:05 +02:00
Samuel Mannehed 5d570207f7 Standardize on camelCase in Display 2020-05-31 23:21:35 +02:00
Samuel Mannehed dff4fefa3c Remove unused properties and variables
The code that used these were removed in the following commits:

* 9ff86fb718 (RFB._mouse_arr)
* bb6965f2e6 (old_requestAnimationFrame)
* 490d471c53 (Display._c_forceCanvas)
2020-05-31 22:49:41 +02:00
Pierre Ossman c4eb4ddcfe Handle slow loading of images
Internet Explorer seems to flag images as loaded prematurely, which
can result in rendering bugs. We can detect this by looking at the
dimensions though.
2019-12-23 15:52:54 +01:00
Pierre Ossman 4babdf33bd Validate decoded image dimensions
They are expected to be a certain size, so verify this so no server
tries to do something broken.
2019-12-23 15:42:02 +01:00
Samuel Mannehed 412d93060d Update copyright to 2019 for modified files 2019-09-30 15:35:33 +02:00
Pierre Ossman e5255fc246 Remove pointless Display.clear()
It served no meaningful purpose and it had bugs. So let's remove it
rather than try to fix it.
2019-08-23 15:05:58 +02:00
Pierre Ossman 3855a7bee4 Remove unused Display.logo attribute 2019-08-23 15:04:23 +02:00
Samuel Mannehed a136b4b078 Allow autoscale() with zero height or width
Commit 6e7e6f9 stopped the function from running if width or height was
zero, this commit reverts that change. This commit also makes the
resulting canvas 0x0 if autoscale is called with zero. By adding this
special case we can avoid division by zero in the calculations.
2019-04-02 16:51:18 +02:00
Samuel Mannehed 6e7e6f9c9e Add check for bad values for Display.autoscale() 2019-03-08 16:30:43 +01:00
Juanjo Diaz 44f4c5545f Move support check from display to browser 2019-02-27 10:13:50 +02:00
Solly Ross 84586c0f17 Change copyright header (#1138)
* Change copyright header

This updates the copyright header to say "The noVNC Authors".  People
who previously had copyright listings are now under the AUTHORS file.
2018-10-09 12:15:35 +02:00
Pierre Ossman 942a312779 Enforce object key spacing 2018-09-06 17:07:11 +02:00
Pierre Ossman 6786fd8719 Enforce comma spacing 2018-09-06 16:43:31 +02:00
Pierre Ossman ab1ace383e Handle fractional screen sizes
With high DPI systems we can end up with a container with a size that
is not an integer number of CSS pixels. Make sure we can handle those
cases by allowing a fractional size for the output canvas. Framebuffer
size and viewport coordinates are still restricted to integer dimensions
though.

Based on initial patch by Alexander E. Patrakov.
2018-07-26 14:15:59 +02:00
Juanjo Diaz 0e4808bf6f Use ES6 classes
Always use the shorthand notation if the function is a method of an object or class `{ foo() { ... } }` or `class bar { foo() { ... } }`
unless it's a callback in which case you a fat arrow function should be used `{ cb: () => { ... } }`
2018-07-12 19:06:57 +02:00
Pierre Ossman 67fefcf184 Merge branch 'cursor' of https://github.com/CendioOssman/noVNC 2018-07-11 13:39:37 +02:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz 8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00
Pierre Ossman b475eed5fa Separate out cursor handling
Make cursor handling more generic in preparation for generic handling
of corner cases.
2018-03-15 17:22:21 +01:00
Juanjo Diaz 9e1bd410aa Remove jshint comments 2018-01-31 07:38:29 -08:00
Pierre Ossman 72abf78487 Merge branch 'master' of https://github.com/josiah2009/noVNC 2017-12-14 12:50:38 +01:00
Pierre Ossman 9b84f51685 Move resize handling in to RFB object
Makes the API simpler and makes it easier for other frontends to
get this functionality.
2017-12-06 11:29:57 +01:00
Josiah White baf822d3de Initalize cached 16x16 tile. 2017-11-30 03:17:02 -05:00
Pierre Ossman 002907d2ce Remove "downscale only" mode
The normal scaling mode should be sufficient for most use cases, so
let's keep the interface simple.
2017-11-09 13:13:41 +01:00
Pierre Ossman 0460e5fdbe Improve naming for viewport properties 2017-11-09 13:13:41 +01:00
Pierre Ossman a80aa41628 Change clippingDisplay() to a property
It fits much better as a property given that it only tells what the
current state of things are.
2017-11-09 13:13:41 +01:00
Pierre Ossman 747b462337 Use standard JavaScript properties
Use normal properties with JavaScript setters and getters instead of
our homegrown stuff.

This also changes the properties to follow normal naming conventions.
2017-11-09 13:03:32 +01:00
Pierre Ossman fdff59eeb4 Move cursor URI check to RFB object
Keeps the Display object simpler, and avoids having to abuse a
property to transfer the information.
2017-11-09 12:52:05 +01:00