plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit f50c3e956ffbeb15f3d386752805d1baf1c708df
parent bbdebeff976a1fa1b787d285dabba617a8febbf3
Author: Russ Cox <rsc@swtch.com>
Date:   Fri,  2 Apr 2010 14:53:13 -0700

devdraw: only one flushproc, please (OS X)

R=rsc
http://codereview.appspot.com/799045

Diffstat:
Msrc/cmd/devdraw/osx-screen-carbon.m | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 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;