9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rob@plan9.bell-labs.com rob@plan9.bell-labs.com
Subject: [9fans] X device
Date: Tue, 25 Aug 1998 12:13:19 -0400	[thread overview]
Message-ID: <19980825161319.d775btZoApG1pN9Q74mJE8nh2rQWbnrMkLN9vGFAG9o@z> (raw)

I did this for Inferno, which has a different graphics protocol but
the same overall architecture, so it can be done.  I don't wish the
job on anyone; it's a nasty mess to get two unrelated graphics models
to function together.

I did it by modifying the underlying library, not the driver, although
I probably had to tweak the driver a bit; it was a while ago and my
memory has faded.  The basic notion was to allocate a bitmap on the
server for each image and then, for each operation, try to use remote
operations to do the work.  If they couldn't be done there, the
operation was done locally and sent over as an array of pixels.
Things like ldepth conversion were the hardest to handle.  In the end,
I lazily allocated a different ldepth pixmap (?)  on the server for
each image in Inferno, which I could at least use as a valid source.
But X doesn't mix ldepths much, other than having special pattern
operators defined with ldepth 0, so any of the myriad things we do
with mixing ldepths had to be done cleverly or go slow.

I did not use X fonts, but translated all character drawing into
already-implemented operations, to keep things simple and portable.

Getting all this to go fast involved much trickery and analysis of X
internals.  The result is barely satisfactory.  Plus, a huge piece of
the code deals with the psychotic pas de deux of allocating a screen
and color map in X. When it came to 16-bit X screens, we cut bait; it
wasn't worth any more time.

Similar games can be done on Windows, but it's much easier there, at
least conceptually, because you can write code that runs on (in X
terminology) the server and also just paint data on the screen, in
other words, decode the Plan 9 protocol on the machine with the frame
buffer.

-rob




             reply	other threads:[~1998-08-25 16:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-25 16:13 rob [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-09-06 16:50 miller
1998-08-26 17:49 Russ
1998-08-26  8:59 forsyth
1998-08-26  8:18 Elliott.Hughes
1998-08-25 19:30 Scott
1998-08-25 18:56 Digby
1998-08-25 17:48 rob
1998-08-25 17:03 Digby
1998-08-25 14:24 Digby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980825161319.d775btZoApG1pN9Q74mJE8nh2rQWbnrMkLN9vGFAG9o@z \
    --to=rob@plan9.bell-labs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).