[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch] cocoa.m - Core Graphics support

From: Alexander Graf
Subject: Re: [Qemu-devel] [patch] cocoa.m - Core Graphics support
Date: Thu, 31 Jan 2008 09:29:02 +0100

On Jan 30, 2008, at 9:30 PM, Mike Kronenberg wrote:

On 30.01.2008, at 19:59, Alexander Graf wrote:

On Jan 21, 2008, at 5:18 PM, Mike Kronenberg wrote:

This is a complete rewrite of cocoa.m to support Core Graphics.

As mentioned in earlier threads, the QuickDraw API is depreciated starting with OS X 10.4.
Now with OS X 10.5 it won't even compile QuickDraw code on x86_64.

This implementation of cocoa.m has the following features:

[new] partial drawing of the window as needed, implemented with CG.
[new] fullscreen support
[new] tablet support
[new] View menu and item to enter Fullscreen (cmd-f)
[new] Help menu and items to show qemu-doc.html (cmd-?) and qemu- tec.html in the OS X "Help Viewer"
[new] -name is shown in Title-bar of window
[fix] Application menu creation for 10.4+ (API is private as of 10.4) [fix] Mouse-clicks on the guests window widgets are no longer intercepted [fix] apple keyboard shortcuts forwarded (minimize (cmd-m), hide QEMU (cmd-h), quit QEMU (cmd-q))

It should compile on ppc/intel starting form 10.3 (10.2 with the known workarounds).

Please test and comment

I'm sorry that I didn't find the time to test this implementation before.

It's damn slow.

I ran it using my x86_64 on 10.5.1, targetting x86_64-softmmu and booting a linux kernel. I could literally see every like getting repainted (which btw did not happen with my quick hacky version I sent to the list some time ago).

I think the major problem is that too much is being done during drawRect. If I understand the code correctly, you create CGImage objects on every repaint, which is prone to be slow.

Why not simply reuse the framebuffer qemu provides anyway and leave everything else to CG?


Hi Alex,

yes, as stated earlyer, it is slower than Quickdraw, especially if the whole screen is redrawn. Overal emulation speed for GUI apps is faster, dough, as only small portions of the screen are redrawn.

That's good to hear. I tend to use Linux in command line mode in qemu quite often though, so for me the most important thing is full screen update, which apparently became slower. Merely running an SDL targeted qemu (did this on x86_64 linux) vs a cocoa one shows that something feels wrong on cocoa. Maybe there is no other way around this, but I still don't like seeing the screen scroll line for line ;-).

Unfortunately I don't have the time right now to investigate this in detail and I am really not into graphics programming usually. So for the time being it is still _way_ better than a solution that doesn't even compile.

The one thing I want to stress here is that maybe it might be worth looking into alternatives. If I find the time to do it, I will do so. I somehow like the idea of having a GL based video output.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]