I am trying to find out what actually happens in background when we do this (please see the image)
As you can see in image I have added few buttons and have checked Content View from Interface builder for window.
Now as we know it will make use of core animation or say will create layers. (Please correct me if I am wrong. Still studying...)
I want to know how does these buttons are drawn?
My assumption is when we tick Content View, these buttons are drawn from CGBitmapContextRef and bitmap created from it are handed over to Core Animation (OpenGL). But I am not being able to prove it so far. How do I prove it? Any example or some approach idea would be great?
Thing I am sure of is buttons created from CGBitmapContextRef. But what happens to those button images is unknown.
Can anyone explain how is that integration possible? How those image would have got on screen?
Edit:
To add some more information on same topic, please check the image below for layers of OpenGL. I think I am targeting common OpenGL Framework layer.
I would start by making a tight loop that re-draws your buttons forever. Then, while it's running, use Activity Monitor to do a sample trace of your process. You'll see all the code paths it's taking to draw the buttons. You should be able to see what's happening from there from the names of the routines in the drawing stack. If you can't make sense of it, post the relevant bits and here and we could take a look.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With