26 Commits
Author SHA1 Message Date
osy 4e275c8898 project: refactored CocoaSpice into package
This gives us a few main advantages:

1. It improves encapsulation and division of responsibility.
2. CocoaSpice can be used in other projects more easily.
3. It lays the foundation for better unit testing of key parts.
4. It cleans up the codebase.

Resolves #2376
2022-02-08 14:41:17 -08:00
osy 93979b61a4 renderer: do not invert cursor in GL mode 2021-11-05 15:17:22 -07:00
osy e13eab7c18 renderer: invert colour for mouse cursor 2021-11-02 22:04:35 -07:00
osy 2aaac9054c CocoaSpice: remove render queue, refactor code
There's a race condition caused by `drawRegion` using a `canvasData`
that has already been freed. So we make sure that the canvas is still
allocated.

Also refactor the CSDisplay code to use properties.
2021-08-31 09:43:10 -07:00
osy 148efde136 CocoaSpice: enable GL rendering 2021-08-02 16:12:03 -07:00
osy 90e5e03007 renderer: re-work draw lock code for better performance 2021-07-10 18:14:53 -07:00
osy 9977a79c1d renderer: fix screen tearing issues
Fixes #2569
2021-07-10 13:36:01 -07:00
osy 23dde8cfaa CocoaSpice: refactor cursor drawing into display
There was a misunderstanding previouly that the input code and
cursor drawing code should reside in the same class. This led to
one CocoaSpice class handling both the SPICE input and cursor
channel. The problem is that SPICE protocol specifies a 1-to-1
mapping of cursor channel and display channel (sharing the same
channel id). To implement support for multiple displays, we
would have to follow this convention.

Additionally, there was some akwardness in forcing CSInput to
comply with the UTMRenderSource protocol because it shared the
viewport size with CSDisplay. "Outside" code would have to
syncronize the display size.

As part of the refactor, we also tried to improve the code style
by first moving as many ivars to properties as possible and by
also renaming some methods and inits.
2021-03-13 13:21:44 -08:00
osy 71e9b1c8e8 renderer: fixed race condition in drawing
Fixes #355
2020-05-30 21:07:20 -07:00
osy 342fdb86b4 logging: NSLog -> UTMLog to support logging to file 2020-05-18 13:12:29 -07:00
osy 61c173c71c renderer: support changing sampler 2020-04-11 14:43:41 -07:00
osy 2fbf8f5809 CocoaSpice: moved screen translation to shaders
Previously, we were using viewports to handle translation and scaling. This
led to issues where if the VM display is larger than the device's display
then the screen would be cut off. We move the affine transformation to part
of the vertex shader now.

Fixes #181
2020-03-27 22:25:27 -07:00
osy fd0516900d renderer: fix GPU issues due to rendering to hidden view 2020-03-16 14:30:12 -07:00
osy 633520372b CocoaSpice: implement alpha blending for cursor 2020-03-08 15:25:45 -07:00
osy 3dbf138ae0 vm: fixed bug where cursor is out of position when screen moves 2020-03-08 14:00:44 -07:00
osy df7b659cfb CocoaSpice: implemented cursor drawing
Resolves #106
We draw the cursor as a second textured rectangle. Currently, we do not do
alpha blending so there is an ugly black border around the cursor.
2020-03-08 01:25:28 -08:00
osy a7d8e875e3 CocoaSpice: refactored display rendering code
Make way for rendering cursor in a separate rectangle.
Maybe affect issue #23 where rebuildVertices crashes, but needs to be tested
more.
2020-03-08 01:08:27 -08:00
osy 3e83114583 changed organization name 2020-01-29 20:30:05 -08:00
osy 5e72e97814 Home: show screenshot 2019-05-04 20:28:01 -07:00
osy a3e85f180d Renderer: added scaling reset 2019-04-21 20:06:49 -07:00
osy 2c54a46f86 Renderer: implemented mouse support 2019-04-21 19:45:52 -07:00
osy 93ee5ce66c Renderer: panning clips to bounds 2019-04-21 16:21:54 -07:00
osy b663f80e17 Renderer: implemented panning and zooming 2019-04-21 01:08:31 -07:00
osy b9be534248 CocoaSpice: fix issues with rendering
Fixed wrong prototype for monitor config changed event
Added a draw lock for rendering
Improved reference counting for GTK objects in Cocoa
2019-04-18 19:42:18 -07:00
osy ad5a688d83 UTM: initial display works 2019-04-17 23:52:10 -07:00
osy 6cd269432d Renderer: implemented Metal rendering 2019-04-15 14:02:33 -07:00