realtime profiling-- instant gamma?
realtime profiling-- instant gamma?
- Subject: realtime profiling-- instant gamma?
- From: arekkusu <email@hidden>
- Date: Tue, 15 Oct 2002 01:30:14 -0700
Hi, I am interested in getting realtime visual feedback of how my CPU
time is spent on different bits of my code. Many years ago, on another
platform, I was able to do this very easily by changing either color
palette entries or the system's border color register, around the code
being profiled. The display would update instantaneously and profiling
was simply a matter of watching how many scanlines the color was
displayed for (assuming a realtime task, synced to VBL so that the
color change is always in the same portion of the screen...)
Nowadays, we have 24-bit color, so no color palette to play with. And
Sampler.app is sort of useful but visual feedback would be much more
intuitive for me.
I am hoping there is a way to achieve this in OS X, perhaps with
CGSetDisplayTransferByTable(). I could change the system gamma to i.e.
red-scale around the code being optimized. However, it appears (at
least on my TiBook) that the gamma is only updated after VBL, not
instantaneously. I found that the old "MacGamma" sample code mentions:
"SetDeviceGammaRampXX may not return until the VBL following the call,
depending on the display driver, this is due to the handling of the
Control call by the driver."
Is there any way to force the gamma to update instantaneously? Short of
writing my own display driver...
thanks,
-alex
_______________________________________________
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.