Hi;

On Fri, 2008-07-04 at 22:29 +0200, Dirk Meyer wrote:
> 
> I have a grid widget (clutter.Group) with some images in it. All imges
> have a reflection. The reflection clutter.Texture is based on cairo (I
> took the code from entertainer or gloss). This means software
> rendering. It is possible to scroll in the grid widget. When I scroll
> down to a row not drawn yet I create the missing widgets on the
> fly. This means I create x images and x reflections. Doing that makes
> the scroll animation not smooth anymore.
> 
> The reason is simple: it takes some time to load the images and way
> too much time to render the reflection. For the first problem I could
> use some async loader stuff from gdkpixmap, but how to solve the
> reflection delay? I'm not allowed to do that in a thread but I'm still
> thinking of a way to do it anyway (is cairo thread-safe?).

Some rough thoughts from me (note, I know nothing about bindings..).

Rendering with Cairo in Clutter, in terms of at least creating the
initial texture isn't accelerated, its all currently done in software.
One thought on how you could create a basic reflection effect with out
any subclassing, cairo etc is clone the source texture, then flip it 180
around X axis and then overlay a pre built cloned texture with a
background color to alpha gradient. That would only work though if
beneath all that is a solid colour. 

For images, You could have a worker thread loading the actual images and
then pushing the actual data to the texture in the main thread (or using
gdkpixbuf async stuff) and just have stub image or 'proxy' type texture
in there to begin with. 

  == Matthew

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to