DirectFB - Home of the pragmatist Roadmap


[directfb-dev] Re: Question about normal cooperativemode
Mailing List archive

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

[directfb-dev] Re: Question about normal cooperativemode



Quoting Juha Vierinen:
> Hi guys,
> 
> First of all, thanks for the cool API and XDirectFB!
> 
> I am writing a magnifying glass app that basically just zooms a bitmap. 
> Currently, I have a function that takes source and destination surfaces, 
> and renders the graphics from the source to the destination, as if the 
> light would have gone through a half sphere. I would like to access the 
> contents of the currently visible framebuffer. Is there any way to do 
> this, and still be able to render the magnified surface in a window? 
> This would be nice eye candy for XDirectFB.

Hey, cool idea ;)

The visible framebuffer, i.e. the composition of all windows,
is the surface of the display layer. You can get access to it via
IDirectFBDisplayLayer::GetSurface(). Reading or blitting from it
provides the visible screen content.

Unfortunately, the glass window itself is included. Unless a warp effect
is wanted, like the one of qmag on our Qt screenshot, you would have to
hide the glass window temporarily. This is not acceptable as it would produce
easily visible flicker.

A rough idea is to provide a public API to the stack compositing engine.
The simplest version satisfying your needs would be the following method:

IDirectFBDisplayLayer::ComposeTo( IDirectFBDisplayLayer *thiz,
DFBRegion *region, IDirectFBWindow *upper, IDirectFBSurface *destination )

It would compose the chosen 'region' of the stack using all windows
stacked below 'upper' writing to 'destination'.

However, polling the contents by regularly calling this method wouldn't be
acceptable, too. So there should be a way to get a notification for each
window stack update. Adding a new event class DFEC_DISPLAYLAYER and adding
CreateEventBuffer() and AttachEventBuffer() to IDirectFBDisplayLayer would
offer this and much more, e.g. events for configuration changes including
screen resolution etc.

Comments?

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

                            Convergence GmbH


-- 
Info:  To unsubscribe send a mail to ecartis@directfb.org with 
"unsubscribe directfb-dev" as subject.



Home | Main Index | Thread Index


directfb.org / Development / Old Archives