commit f50c3e956ffbeb15f3d386752805d1baf1c708df from: Russ Cox date: Fri Apr 02 21:53:13 2010 UTC devdraw: only one flushproc, please (OS X) R=rsc http://codereview.appspot.com/799045 commit - bbdebeff976a1fa1b787d285dabba617a8febbf3 commit + f50c3e956ffbeb15f3d386752805d1baf1c708df blob - d4720be7708a2322fafdc6d439f81909437647a3 blob + 6f3b431228ab10958905f01265462a1f0d4f9ef2 --- src/cmd/devdraw/osx-screen-carbon.m +++ 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;