[sugar] [Fwd: Re: Fast Screenshot without blocking X events]

Tomeu Vizoso tomeu
Wed Oct 17 05:18:05 EDT 2007


On Wed, 2007-10-17 at 11:07 +0200, Marco Pesenti Gritti wrote:
> On 10/17/07, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> > On Wed, 2007-10-17 at 03:58 -0400, Bernardo Innocenti wrote:
> > > For those of you complaining that taking screenshots
> > > was slow... it seems there's not much we can do even
> > > with Composite and the latest X server.
> >
> > Well, last time I measured, it took 0.15s. to take a fullscreen
> > screenshot on the xo. So we are not so bad.
> >
> > If with composition we can take the screenshot while the window is
> > hidden (and before the window is iconified/unmapped), then we'll be able
> > to take reliable screenshots without using much extra memory during a
> > long period.
> 
> Though we can't take reliable screenshots from the home page without
> compositing all the windows :(

Well, I was hoping the following scheme would help there:

1. User switches from the current activity to another zoom level.

2. Activity window gets covered by the window of that zoom level.

3. User switches to another activity window.

4. The first activity (that though being non-visible was still the
"active" window) receives the SetActive(False) dbus message. At that
point, the activity takes a screenshot, scales it down and stores a png
representation of it (~30KB). Next, the activity auto-iconifies itself.

5. User goes to the home view and, whether he closes the first or the
second activities, the journal entry saved will have an updated
screenshot. At some point we have had 2 pixmaps of 2MB each in the X
server, but most of the time we only have one for the active Activity
window.

Sounds good?

Tomeu




More information about the Sugar-devel mailing list