9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] mouse cursor madness
Date: Mon, 15 Apr 2013 13:28:32 -0400	[thread overview]
Message-ID: <8860d1bf09bc55e9c7837dcedb7cd266@ladd.quanstro.net> (raw)
In-Reply-To: <cbfb0708653f90cf5a067b03f02782dd@rei2.9hal>

On Sun Apr 14 14:17:35 EDT 2013, cinap_lenrek@gmx.de wrote:
> the way the mouse cursor is drawn currently is quite complicated.
> the cursor is redrawn from a timer interrupt 30 times a second
> and the software cursor also installs its own timer interrupt
> handler to redraw itself when it got overdrawm (swcursoravoid).
>
> when a programs use draw operations heavily, the chances become high
> that when the software cursor interrupt handler finds the drawlock
> busy, so it has to retry to draw on the next tick. (thats why
> cursoron() has a return value... to indicate the retry).
>
> this causes ugly flickering and it keeps the machine busy for
> no reason.

hey, this is an interesting approach.  it seems much cleaner.

but i'm not seeing as much flicker reduction as i was expecting,
and text scrolling speed is not (as expected) improved.

part of this may be that i've set HZ=1000, but it also seems to
me that a coalescing scheme might be in order.  even with HZ=100,
one could have a minimum of 100 cursor redraws/sec, which seems
excessive.

any ideas on this?

- erik



  reply	other threads:[~2013-04-15 17:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-14 17:16 cinap_lenrek
2013-04-15 17:28 ` erik quanstrom [this message]
2013-04-15 17:35   ` cinap_lenrek
2013-04-15 19:23     ` erik quanstrom
2013-04-15 19:27       ` cinap_lenrek
2013-04-15 21:03         ` erik quanstrom
2013-04-15 20:01     ` erik quanstrom

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=8860d1bf09bc55e9c7837dcedb7cd266@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).