Matthew Allum wrote:
> 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. 

Not a good idea, my widget does not know about the background. I found
out that image loading with imlib2 is faster than with gdkpixbuf (and
I could do that in a thread). I use set_from_rgb_data to put the image
into the texture. I want to use imlib2 also for the reflection but I
need the data from the texture. There seems to be no simple
get_from_rgb_data function. Any plans to add that for 0.8?


Dischi

-- 
C++: The power, elegance and simplicity of a hand grenade. (Kenneth C. Dyke)
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to