On Wednesday 15 October 2008, Jamboarder wrote:
> > From: Aaron J. Seigo <[EMAIL PROTECTED]>
> > one outstanding issue will be clearing the disk and parameter caches when
> > the theme is updated on disk but not changed in the config.
> >
> > before i go any further with this approach: any thoughts, ideas,
> > inspirations?
>
> It might be useful in general to scope out all the "persistent stores" of
> SVG related information and when they need to be cleared/refreshed. As far
> as I can tell, these "stores" currently include:
> - Plasma::Svg QPixmapCache

replaced by Plasma::Theme's KPixmapCache

> - Plasma::Svg renderers (the shared svg renderer hash)

backstop to limit impact of actually creating renderers.

> - Plasma::PanelSvg QPixmapCache

should also be replaced by by Plasma::Theme's KPixmapCache

> - this new Plasma::Svg cache(s) for the hint and element parameters.

which should also probably move to Plasma::Theme

> The events that trigger a clear/refresh include:
> themeChanged (if the theme image path is different)
> colorsChanged (for svgs that have the apply colors hint)

these should cause global wipes of the caches, yes.

> setImagePath (if the path is different that the current one)

this only affects Plasma::SharedSvgRenderer usage, and is local to any given 
Plasma::Svg object.

> Should a clear/refresh be triggered if the path hasn't changed but the
> actual file has?

for correctness, yes. i don't think path changes happen often enough to worry 
about the cost of creating a QFileInfo (so as to get at the modification time), 
but that would also mean storing that mod time in the cache.

> Are there other events that should trigger a refresh?

installing a new set of files over the current theme at runtime. i think we can 
safely ignore that one and require a manual theme reset at that point.

> Is it worth consolidating the clearing/refresh of these "persistent stores"
> in one place (at least for Plasma:Svg)?

yes, in Plasma::Theme. why? it knows when the theme parameters change.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to