devdraw: only one flushproc, please (OS X)
R=rsc http://codereview.appspot.com/799045
This commit is contained in:
parent
bbdebeff97
commit
f50c3e956f
@ -61,6 +61,7 @@ struct {
|
|||||||
int kalting; // last keystroke was Kalt
|
int kalting; // last keystroke was Kalt
|
||||||
int touched; // last mouse event was touchCallback
|
int touched; // last mouse event was touchCallback
|
||||||
int collapsed; // parked in dock
|
int collapsed; // parked in dock
|
||||||
|
int flushing; // flushproc has started
|
||||||
NSMutableArray* devicelist;
|
NSMutableArray* devicelist;
|
||||||
} osx;
|
} osx;
|
||||||
|
|
||||||
@ -871,7 +872,10 @@ _flushmemscreen(Rectangle r)
|
|||||||
qlock(&osx.flushlock);
|
qlock(&osx.flushlock);
|
||||||
if(osx.windowctx == nil){
|
if(osx.windowctx == nil){
|
||||||
QDBeginCGContext(GetWindowPort(osx.window), &osx.windowctx);
|
QDBeginCGContext(GetWindowPort(osx.window), &osx.windowctx);
|
||||||
proccreate(flushproc, nil, 256*1024);
|
if(!osx.flushing) {
|
||||||
|
proccreate(flushproc, nil, 256*1024);
|
||||||
|
osx.flushing = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cgr.origin.x = r.min.x;
|
cgr.origin.x = r.min.x;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user