diff options
author | Russ Cox <rsc@swtch.com> | 2010-04-02 14:53:13 -0700 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2010-04-02 14:53:13 -0700 |
commit | f50c3e956ffbeb15f3d386752805d1baf1c708df (patch) | |
tree | 4cd6b4511a338feb3d35cf337883fd67cf9abd24 /src/cmd | |
parent | bbdebeff976a1fa1b787d285dabba617a8febbf3 (diff) | |
download | plan9port-f50c3e956ffbeb15f3d386752805d1baf1c708df.tar.gz plan9port-f50c3e956ffbeb15f3d386752805d1baf1c708df.tar.bz2 plan9port-f50c3e956ffbeb15f3d386752805d1baf1c708df.zip |
devdraw: only one flushproc, please (OS X)
R=rsc
http://codereview.appspot.com/799045
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/devdraw/osx-screen-carbon.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/devdraw/osx-screen-carbon.m b/src/cmd/devdraw/osx-screen-carbon.m index d4720be7..6f3b4312 100644 --- a/src/cmd/devdraw/osx-screen-carbon.m +++ b/src/cmd/devdraw/osx-screen-carbon.m @@ -61,6 +61,7 @@ struct { int kalting; // last keystroke was Kalt int touched; // last mouse event was touchCallback int collapsed; // parked in dock + int flushing; // flushproc has started NSMutableArray* devicelist; } osx; @@ -871,7 +872,10 @@ _flushmemscreen(Rectangle r) qlock(&osx.flushlock); if(osx.windowctx == nil){ 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; |