On Tue, 25 Jan 2005 20:40:38 -0800, Eric Schlegel <email@hidden> wrote:
> I think the primary issues would be:
> - don't share a CGContext across threads; I don't believe Quartz
> synchronizes context access. Use a separate context for each thread.
Actually, you can do this. As long as the area's being drawn to by the
different thread don't overlap then Quartz can handle the same context being
used my multiple threads. Internally it serializes accesses to the context.
> - I'm not sure how the default flushing done by the Event Manager will
> apply to drawing done in a separate context. You may need to flush
> explicitly (sounds like it given your results so far). The general
> structure would be: first, draw everything, and second, call
> CGContextFlush. You won't need to call CGContextSynchronize,
> QDFlushPortBuffer, or QDSetDirtyRegion as long as you only draw with
> Quartz and you always call CGContextFlush at the end of the drawing.
Somewhere there's a disconnect between the context that you're drawing to
and what's visible on the screen. Dirtying the context should mark it as
needing to be flushed and the window server should eventually get around to
flushing it.
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden