Commit Graph

21 Commits

Author SHA1 Message Date
Pierre Ossman
26586b9ddf Remove colour map support
It was broken and unused. Remove it so we can simplify the code.
2017-05-04 15:13:33 +02:00
Pierre Ossman
fb7e99e84b Remove browser engine detection
It is out of date and not used anyway.
2017-05-04 14:52:05 +02:00
Pierre Ossman
38170d2442 Merge branch 'png_cursor' of https://github.com/CendioOssman/noVNC 2017-05-04 13:13:02 +02:00
Solly Ross
6d6f0db0da Refactor ES6 module structure/split up Util
This commit restructures many of the ES6 modules, splitting them
up to actual export multiple functions instead of a single object.

It also splits up Util into multiple sub-modules, to make it easier
to maintain.

Finally, localisation is renamed to localization.
2017-03-21 17:39:05 -04:00
Pierre Ossman
83250a6aa6 Use PNG for mouse cursors
The browsers' support for Microsoft's cursor format is a bit spotty,
so use the more common PNG format instead. This also allows us to
use a Canvas to generate the image, rather than coding it by hand.
2017-03-06 16:29:27 +01:00
Solly Ross
3ae0bb0968 Uncomment ES6 module syntax
This removes the special comment part of the ES6 module syntax,
opting to enable ES6 module syntax by default.

It also appends `.js` to all import paths to better support in-browser
loading.
2017-02-26 16:30:37 -05:00
Pierre Ossman
a7ca8e5c1a Fix wrong colours on local cursor
The RGB order was backwards compared to the pixel format we've
requested, resulting in the red and blue channels getting swapped.
2017-02-20 16:44:54 +01:00
Samuel Mannehed
280676c7e9 Properly encapsulate the scale in Display
Other parts of the code shouldn't have to care about this. Let Display
convert between canvas coordinates and framebuffer coordinates.
2017-02-16 14:00:39 +01:00
Pierre Ossman
2e6a58fb15 Avoid changing scale unless necessary
It causes the browser to redo the layout needlessly otherwise,
having annoying effects like moving the scroll position.
2017-02-03 12:00:13 +01:00
Pierre Ossman
a6e52f9a73 Merge display scale changes 2017-02-03 11:56:02 +01:00
Pierre Ossman
adf345fdc4 Clean up viewport handling
Make sure the viewport is properly updated when necessary, on respects
given restrictions.
2016-12-09 09:20:50 +01:00
Pierre Ossman
3f781f2aa3 Remove max dimension handling
The viewport handling is now a lot clearer, so simply limit the size
of the viewport in the caller rather than having this extra layer
of checks.
2016-12-09 09:20:50 +01:00
Pierre Ossman
e549ae074f Prevent access to sensitive display variables
These should not be directly accessed. Instead use drawing operation
and Display.resize().
2016-12-09 09:20:50 +01:00
Pierre Ossman
84cd0e719e Double buffering damage tracking
Optimise the copy from the hidden canvas to the visible one a bit
by only copying the modified area.
2016-12-09 09:20:50 +01:00
Pierre Ossman
2ba767a7fe Use double buffering for the display
Do all rendering to a hidden canvas and then copy over the finished
frame to the visible canvas once everything is done. This simplifies
things and solves some bugs as we can retain a copy of the entire
frame buffer.
2016-12-09 09:20:50 +01:00
Pierre Ossman
74e390512d Remove blitStringImage() in favour of imageRect()
The latter is more generic and can easily be modified for other
mechanisms in the future.
2016-12-09 09:20:50 +01:00
Pierre Ossman
d9ca5e5b6b Don't allow more than one pending update 2016-10-24 14:42:45 +02:00
Pierre Ossman
bb6965f2e6 Wait for proper image load event
There is a specific event for when an image has finished loading,
so trigger on that rather than polling. The polling interval of
requestAnimationFrame() can also be very large.
2016-10-24 14:42:13 +02:00
Pierre Ossman
1578fa68ac Hide image handling in display object
The callers don't need to concern themselves with how images are
rendered, so hide the details behind the API. This also avoids
exposing the render queue.
2016-10-24 14:42:13 +02:00
Solly Ross
e4fef7be2d Util shouldn't modify window object
This commits prevents Util from modifying the window object.

- `window.requestAnimFrame` was removed (no polyfill is needed anymore)
- the potential redefinition of `console.log` and friends was removed
  (all supported browsers have `console.xyz` defined anyway)
2016-09-16 15:49:52 -04:00
Solly Ross
ae510306b5 Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
2016-09-16 15:49:51 -04:00