Hi everyone,

A false assumption about how <canvas> graphics contexts are shared led
me to set up mutually exclusive clipping regions on screens with
multiple windows, preventing anything from being drawn.  Now that I am
confident in my drawmasked clipping code, I was able to remove this
fail-safe clipping entirely, and rio started displaying windows!

My initial implementation of windows used the Refnone refresh
discipline, with each window drawing directly to a rect in the
containing screen's canvas.  This made windows hard to move, and caused
problems with drawing to overlapping windows.

I changed all windows to use Refbackup and gave them all their own
backing image, and then used a simple painter's algorithm to redraw
the screen completely on each flush request.  This produced a correct
result, but was unbelievably slow and crashed my browser within
seconds.

For now, I'm using CSS to position each window's backing canvas
directly over the screen.  This works for the common case, but fails if
screens other than the root window are used, and does not allow
the data to be read to use the screen as the src image for some other
drawing operation.

Next up is to implement a lighter-weight drawing function that doesn't
need to create a full-blown intermediate <canvas>.  A simple drawY()
working directly on the pixel data should be trivial, since I don't
have to worry about multiple channel formats.  With an efficient
drawing method, I will be able to implement proper memlayer clipping.

A screenshot of rio is here:
http://davidrhoskin.com/gsoc/2014/img/rio-basic.png
Unfortunately, there's a bit of a bug: graphical clients grab the whole screen!

-- David

-- 
You received this message because you are subscribed to the Google Groups "Plan 
9 Google Summer of Code" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to plan9-gsoc+unsubscr...@googlegroups.com.
To post to this group, send email to plan9-gsoc@googlegroups.com.
Visit this group at http://groups.google.com/group/plan9-gsoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to