discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GSOC 2013 final update


From: Ivan Vučica
Subject: Re: GSOC 2013 final update
Date: Thu, 31 Oct 2013 22:24:23 +0100




On Thu, Oct 31, 2013 at 10:16 AM, David Chisnall <David.Chisnall@cl.cam.ac.uk> wrote:

I thought we'd removed most of the NSCopyBits usage, because it's never a sensible thing to do on a vaguely modern (last 10 years) GPU.  It would be nice to have it keep working, but it's not something that should be optimised for, and it should probably have a deprecated attribute on it.

I've had to look up what NSCopyBits() is... which speaks volumes of how much I use it and how useful it is for application development.

The thing is, even rendering from NSImage to the screen involves an copy, and -[OpalGState compositeGState:...] method is called fairly often. Not to mention scrolling an NSScrollView.

> Ideally it should be faster to blit an image than to redraw a region, so the always-backing schema should be better. Sadly, that does not seem to be so.

It's faster, if you're using the GPU to do the compositing, but that's something that you handle with layers, not with copies.

It is my understanding that systems accelerated 2D blitting far before the widespread adoption of 3D accelerators :-)

But, when doing 3D rendering one typically rerenders the entire scene and does so quickly. -gui definitely does not do that (nor should it, for the sake of underpowered systems).

I highly suspect that one of the biggest issues is just the mismatch between pixel formats of the X11 on-screen context and the CGBitmapContext-based backing store, so we end up with Opal doing color conversion. I didn't check if I'm saying correct things, but investigating and optimizing Opal's image drawing is first step in getting more decent performance.

We'll still be left with something abysmally slow when using X11 over the network, so a long-term better strategy is figuring out a way to avoid blitting images (and images that are perhaps not even cached on clientside, unlike what Gtk can do with its themes). Correct way would be to use doublebuffering only when asked for it, and to extend Opal API to allow copying from X11 contexts, and not just from bitmap contexts. And then fix whatever issues the Opal backend ends up with because of possible mishandling of rect expose notifications.

--
Ivan Vučica - ivan@vucica.net


reply via email to

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