Access iOS Vram?

I am planning on displaying an image in a UIImageView, and to confirm that the image in the view is what I want it to be, I want to be able to verify it in the VRAM since (from my understanding) this will be the source of data for where the display will be generating its image from. Any ideas or starting points on how to do this? My understanding is coming from https://www.objc.io/issues/3-views/moving-pixels-onto-the-screen/#the-hardware-players

Accepted Answer

I hate to say this but your question doesn’t make any sense because:

  • iOS GPUs don’t have dedicated VRAM, they use the same memory as the CPU

  • if you’re working at the UIKit level, you don’t really need to worry about this sort of thing; UIKit takes care of these details

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Perhaps more importantly:

  • There's no direct, convenient mapping of views to the contents of video memory.
  • That architecture drawing is for a system with a dedicated graphics processor with dedicated graphics memory.

If the problem is:

"I am planning on displaying an image in a UIImageView, and I want to confirm that the image in the view is what I want it to be"

then the solutions to that problem include:

  • Render the view (or, more likely, the parent window) to an image
  • Screen capture


Because there's two important points:

1. That article that you read is trying to do a basic explanation of the Quartz 'draw each view onto a polygon, then render the screen by asking the graphics processor to render all of those polygons' approach to drawing the screen, because that's replaced the previous BitBlt-based approaches to drawing window shaped regions on the screen.

2. The last time "I want access to VRAM to see what it's doing" worked was the BitBlt-based era, on a single application system.

Quinn thanks a lot for your response. Sometimes you need to ask stupid questions to learn 😀 My understanding of the hardware is just beginning and any input is always appreciated.

EDIT: Is there a place in the iOS API that better describes the details?

I had never thought of just taking a screen capture, this would most likely work exactly how I want it to. I will start investigating that more and making sure it fits within my requirements for design assurance. Great idea, Thanks!

Access iOS Vram?
 
 
Q