Virtual Display on OS X

Questions and Answers about all things *OS (macOS, iOS, tvOS, watchOS)

Virtual Display on OS X

Postby masovies » Wed Oct 22, 2014 7:06 pm

Hey,

I purchased this book to learn how to write a driver for an emulated display, but did not find much help.

I have written one with IOFrameBuffer, but it is not hardware accelerated and am not sure where I am going wrong. Do you have any guidance/is there an easier way to trick OS X into thinking there is a display connected that you can drag windows to (GPU accelerated/60fps)?
masovies
 
Posts: 1
Joined: Wed Oct 22, 2014 9:48 am

Re: Virtual Display on OS X

Postby morpheus » Thu Oct 23, 2014 4:02 pm

First, the book was meant as a general internals book, not an immediate one-stop-shop for specific questions such as a virtual display, which is extremely driver-specific.

That said, I aim to cover the [Mobile]FrameBuffer architecture in more detail in the 2nd edition. That, too, won't be at a level of "here's a source code for a virtual display", though the more I think about it the more it strikes me as a good idea for a proof of concept. At least a screengrab from IOMobileFramebuffer on iOS, which is fairly straightforward. So thanks for the idea.

In terms of virtual displays on OS X, screen sharing provides a complete VNC solution to clone the display - if you just wanted to grab the display, you could piggy back on top of that. If you want a full virtual display, there's only so much that hardware acceleration could do here in the first place, especially when we are looking at > 2k resolution - the data is going to be very heavy in those cases. dragging windows is handled by GL/CL, which means the GPU needs to do the work. you could *try* messing with the resolution at the GPU level (if it supports a higher resolution) then projecting (mapping) only some of the window onto the "real" screen, thereby getting an unmapped FrameBuffer which you can then do whatever with.
morpheus
Site Admin
 
Posts: 532
Joined: Thu Apr 11, 2013 6:24 pm


Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 1 guest