[self-interest] VNC client in Self

Russell Allen mail at russell-allen.com
Fri Apr 18 00:11:35 UTC 2014

Hi Chris,
That's a great idea. But I can imagine writing out each pixel one by one would slow even the fastest VM down!
I dont know of any primitives other than the ones exposed through canvas.
I suppose I could suggest various hacks (eg keep image as grid of 8x8 256 colour pixmaps and draw changed ones to canvas as images not pixels?) but you've probably already thought of those and dismissed them...
I don't suppose you feel like writing bindings to libSDL? Then we could abandon both Quartz and X.org :)

On 18 Apr 2014, at 12:05 am, Chris Double <chris.double at double.co.nz> wrote:

> I'm taking a stab at writing a VNC client in Self. Screenshot of
> progress so far is at:
> <http://bluishcoder.co.nz/self/self_vnc.png>
> So far the VNC morph displays the image from the VNC session. No
> interaction yet but I hope to get there soon.
> I wasn't really able to find a performant way to paint the screen
> buffer. I can't use ui2Image to hold the data as that's limited to 255
> colors. At the moment I have a pixmap canvas that the morph holds and
> it updates that in another Process. When it is complete it marks the
> morph as changed. The morph then paints that pixmap canvas onto the
> real canvas in its baseDrawOn method.
> This helps stop the desktop UI from locking up during the draw. A
> 1024x768 image takes a fair while to do the updating. This is because
> I'm doing a 'canvas point: x at y Color: c' for each point in the image
> and each one of these involves creating a paint object for the color.
> Is there a faster way of doing this? I could optimize it using a
> primitive in some way but for the first attempt I'm trying to avoid
> changing primitives.
> -- 
> http://www.bluishcoder.co.nz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20140418/53a1b027/attachment.html>

More information about the Self-interest mailing list