![]() |
Compositor Scaling Sample Code
Code:
/* |
Re: Compositor Scaling Sample Code
pupnik,
anonymous code drops hurt more than they help. please explain what problem it solves and who might need it. |
Re: Compositor Scaling Sample Code
lcuk
isnt that World or Warcraft port in 10 lines:D Mike C |
Re: Compositor Scaling Sample Code
lol mikec
i see the code, but i dont see what to do with it. its not needed by normal gtk apps, and i doubt pupnik would just randomly post something like this without reason. i am just interested to know how it should be used and when we might need it. |
Re: Compositor Scaling Sample Code
|
Re: Compositor Scaling Sample Code
I don't see anything top secret in here, hildon_animation_actor is documented and was discussed on the mailing list.
|
Re: Compositor Scaling Sample Code
It was commented by Konttori (sorry, but can't think why he wouldn't want his name on it, specially if he posted it publicly on IRC ) that the scaling part wouldn't work in the first firmware version -- but will in later versions.
The snippet's method should be basically the fastest way to scale 2d output in the N900 since: -Software scaling: Source bitmap ---(scale in soft)---> scaled bitmap ---(XPutImage/XSHMPut) ---> scaled X11 pixmap ---(hildon-desktop: texture-from-pixmap)--> scaled powervr texture ---(powervr render)--> screen (2d buffer is uploaded once to the powervr, in scaled, "large" form) - Use a EGL window context: Source bitmap ---(glTexImage)---> powervr texture ---(powervr scale&render) ---> scaled framebuffer ---(XPutImage/XSHMPut) ---> scaled X11 pixmap ---(hildon-desktop: texture-from-pixmap)--> scaled powervr texture ---(powervr render)--> screen (longer path, the texture might even be uploaded _twice_ to powervr! -- in which case it is even slower than pure software scaling) - Snippet's method: Source bitmap ---(XPutImage/XSHMPut) ---> X11 pixmap ---(hildon-desktop: texture-from-pixmap)--> powervr texture ---(powervr scale&render)--> screen As you can see, the 2d buffer is uploaded once to powervr and in non scaled form, and hildon-desktop manages the scaling -- less bandwidth used, thus fastest. |
Re: Compositor Scaling Sample Code
Fullscreen windowns will be able to also use non-composited mode, so some of the steps can be skipped for those.
What the compositor scaling provides also is bilinear filtering, which should also look pretty good, but might not be as good as some dedicated game scalers. |
All times are GMT. The time now is 05:01. |
vBulletin® Version 3.8.8