qemu-devel
[Top][All Lists]
Advanced

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

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


From: Mike Kronenberg
Subject: Re: [Qemu-devel] [patch] cocoa.m - Core Graphics support
Date: Wed, 30 Jan 2008 21:30:50 +0100


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?

Alex




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.

Unfortunateley, there is no "official" direct access to the framebuffer anymore, since apple depreciated QuickDraw. [1] This way, there is no sharing/direct mapping of the cg framebuffer and qemu screenbuffer anymore. Every time, a section needs display, that part of the qemu screenbuffer is mapped to a cg image and then copied on top of the CG stack. CG is fully OpenGL based, so basically, if it needs to refresh an area, it has to load the area as texture, hence the copy.

Offtoppic about updated regions in Windows:
While testing with Quartzdebug, I realized, that qemu is updating always the whole screenwidth even if only the mouse is moved... is this a qemu problem, or is this the default windows behaviour?

Mike

[1] http://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_image_data/chapter_6_section_2.html#/ /apple_ref/doc/uid/TP40001098-CH227-BBCFFDBB

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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