View Single Post
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#7
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.
 

The Following 4 Users Say Thank You to javispedro For This Useful Post: