Re: BezierPathLab - multiple images on screen at once
Re: BezierPathLab - multiple images on screen at once
- Subject: Re: BezierPathLab - multiple images on screen at once
- From: Shawn Erickson <email@hidden>
- Date: Sun, 2 May 2004 15:47:28 -0700
On May 2, 2004, at 12:07 AM, Jim Witte wrote:
Hi,
Looking at the included BezierPathLab demo (in xCode, with ZeroLink
off), I noticed that as I spin the figure around, it leaves multiple
images on the screen at once for about 1/2 second until Quartz (I
assume it's Quartz) "cleans it up".
Is this related to how the compositing works with the double
buffering that must be going on automatically - as the program clears
the view first, then draws the new image, which without DB would result
in a flicker - or is that what the call to [currentContext
restoreGraphicsState]at the end of the drawRect: method does?
No it sounds more like a bug in the drawing logic of the demo and/or
more likely an artifact of your screen in conjunction with your
eyes/brain (LCD can be slow in switching).
Quartz2D does/is the 2D drawing and QuartzCompositor does the
compositing to the screen of the window backing buffers, etc.
(QuartzExtreme does this compositing using GPU hardware).
Drawing is normally not flushed to screen until flushed either
explicitly, when a context is released, or when done so automatically
as needed by the OS/framework. I don't believe flushing is done while
in a given call to drawRect (unless done so explicitly), I believe
flushing is held off until the whole view hierarchy of a given window
has been redrawn as needed.
The documentation outlines what restoreGraphicsState does, basically
restores the graphic state (current transform matrix, line widths,
color, etc.) back to the last saved state (saveGraphicsState). It
doesn't cause drawing to take place.
Possibly you are seeing tearing because of not syncing with the refresh
cycle of the screen? (however I believe that should happen for you
automatically)
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.