devdraw: refactor, clean up mac screen
Also turn mac-srv.c into a generic srv.c, so we can remove the duplication with x11-srv.c.
This commit is contained in:
parent
843e5af198
commit
b1a086dee9
7 changed files with 595 additions and 608 deletions
|
|
@ -14,8 +14,6 @@
|
|||
#include <drawfcall.h>
|
||||
#include "devdraw.h"
|
||||
|
||||
extern void _flushmemscreen(Rectangle);
|
||||
|
||||
static Draw sdraw;
|
||||
Client *client0;
|
||||
static int drawuninstall(Client*, int);
|
||||
|
|
@ -32,6 +30,8 @@ _initdisplaymemimage(Client *c, Memimage *m)
|
|||
c->op = SoverD;
|
||||
}
|
||||
|
||||
// _drawreplacescreen replaces c's screen image with m.
|
||||
// It is called by the host driver on the main host thread.
|
||||
void
|
||||
_drawreplacescreenimage(Client *c, Memimage *m)
|
||||
{
|
||||
|
|
@ -141,7 +141,7 @@ addflush(Client *c, Rectangle r)
|
|||
}
|
||||
/* emit current state */
|
||||
if(c->flushrect.min.x < c->flushrect.max.x)
|
||||
_flushmemscreen(c->flushrect);
|
||||
rpc_flushmemscreen(c, c->flushrect);
|
||||
c->flushrect = r;
|
||||
c->waste = 0;
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ void
|
|||
drawflush(Client *c)
|
||||
{
|
||||
if(c->flushrect.min.x < c->flushrect.max.x)
|
||||
_flushmemscreen(c->flushrect);
|
||||
rpc_flushmemscreen(c, c->flushrect);
|
||||
c->flushrect = Rect(10000, 10000, -10000, -10000);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue