diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-04-14 16:28:54 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-04-14 16:28:54 +0200 |
commit | 3045d639691c893dfa3393f88289ad72cbcdd86e (patch) | |
tree | a9e85a6669b8c4ffbc9324cfc35394ceb1b129f9 /sys/src/9/omap/screen.h | |
parent | 58e500f4a717a9faf912e503fa7ba9cbe71a84cc (diff) |
reduce software cursor flickering
the software cursor starts flickering and reacts bumby if a process
spends most of its time with drawlock acquired because the timer interrupt
thats supposed to redraw the cursor fails to acquire the lock at the time
the timer fires.
instead of trying to draw the cursor on the screen from a timer interrupt
30 times per second, devmouse now creates a process calling cursoron() and
cursoroff() when the cursor needs to be redrawn. this allows the swcursor
to schedule a redraw while holding the drawlock in swcursoravoid() and
cursoron()/cursoroff() are now able to wait for a qlock (drawlock) because
they get called from process context.
the overall responsiveness is also improved with this change as the cursor
redraw rate isnt limited to 30 times a second anymore.
Diffstat (limited to 'sys/src/9/omap/screen.h')
-rw-r--r-- | sys/src/9/omap/screen.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/src/9/omap/screen.h b/sys/src/9/omap/screen.h index 6eff3649c..6083aea15 100644 --- a/sys/src/9/omap/screen.h +++ b/sys/src/9/omap/screen.h @@ -20,12 +20,13 @@ extern Point mousexy(void); extern void mouseaccelerate(int); extern void mouseresize(void); +extern void mouseredraw(void); /* screen.c */ extern uchar* attachscreen(Rectangle*, ulong*, int*, int*, int*); extern void flushmemscreen(Rectangle); -extern int cursoron(int); -extern void cursoroff(int); +extern void cursoron(void); +extern void cursoroff(void); extern void setcursor(Cursor*); extern int screensize(int, int, int, ulong); extern int screenaperture(int, int); @@ -49,6 +50,13 @@ extern QLock drawlock; #define ishwimage(i) 0 /* for ../port/devdraw.c */ +/* swcursor.c */ +void swcursorhide(void); +void swcursoravoid(Rectangle); +void swcursordraw(Point); +void swcursorload(Cursor *); +void swcursorinit(void); + /* for communication between devdss.c and screen.c */ enum { @@ -93,7 +101,6 @@ struct Settings { }; struct OScreen { - Lock; Cursor; Settings *settings; int open; |