Skip to content

texture-cache: Update size after setting content

Florian Müllner requested to merge wip/fmuellner/update-tex-size into master

Since commit deec0bf2, the texture cache is based on ClutterImage rather than ClutterTexture. As ClutterImage (like all ClutterContent) is only concerned with painting, it doesn't influence the size of the actor it is added to at all.

That is, unlike with the previous code, the returned actor will now stay at size (0, 0) after the image has been loaded. We'll need to either update all consumers to listent to :content changes, or update the size when setting the content.

The latter looks like the friendlier approach, and should be more in line what we used to do.

I'm about unsure about actors that are sized from CSS/code - with this patch, that size is overridden when the content has been loaded. Maybe we should check the actor's existing size and only change it if zero?

Merge request reports