[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request: Separate caching for unthemed SVGs requesting
From: "Aaron Seigo" <aseigo () kde ! org>
Date: 2010-12-05 20:34:39
Message-ID: 20101205203439.4989.21607 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On 2010-12-05 14:50:33, Manuel Mommertz wrote:
> > It is now even worse then before. Unthemed graphics still use the color=
s from plasma theme but don't get informed if the theme changes. this means=
, the colors that are used when first rendering the graphics stay even if I=
switch the theme.
> > The plasma elements itself don't get rerendered on theme change. Only g=
raphics that have to be rerendered for another reason (resizing a widget, .=
..) get the svg's from the new activated theme.
> =
> Marco Martin wrote:
> well, they shouldn't be informed on theme changes in this case...
> =
> Manuel Mommertz wrote:
> right, but on colorscheme changes. with doesn't happen.
> =
> Aaron Seigo wrote:
> "Unthemed graphics still use the colors from plasma theme but don't g=
et informed if the theme changes."
> =
> unthemed graphics never use colors from the plasma theme. they either=
use no colors, or they use the system colors. in which case are unthemed g=
raphics using the color scheme from the plasma theme?
> =
> "the colors that are used when first rendering the graphics stay even=
if I switch the theme."
> =
> of course. the theme is not relevant. you get to pick between "themed=
" and "unthemed".
> =
> "The plasma elements itself don't get rerendered on theme change."
> =
> which plasma elements?
> =
> "Only graphics that have to be rerendered for another reason (resizin=
g a widget, ...) get the svg's from the new activated theme."
> =
> are you saying that NO svg's (themed or unthemed) are being updated? =
because that works here.
> =
> "right, but on colorscheme changes. with doesn't happen."
> =
> do you mean the KDE color scheme change? e.g. when you change the col=
orscheme in the Colors control panel?
> =
> i'm quite confused now by what you mean. can you give me a clear, sim=
ple use case with detailed steps of reproduction so that i may identify and=
reproduce the problem and subsequently fix it? thanks.
> =
> Manuel Mommertz wrote:
> http://img502.imageshack.us/img502/2729/plasmadesktopxk7517.png
> =
> Steps I did before taking this screenshot:
> =
> Logged in while Oxygen was the selected theme.
> Switched theme to Air.
> =
> Noticed: After switching all graphics stay unchanged. The folderview =
changed after some 10-20 seconds. The handle (seen next to folderview) chan=
ged to air after I unhovered folderview and hovered it again. Panel stays u=
nchanged. The Entry in the taskbar gets the hover-graphic from air while fa=
lling back to oxygen when mouse leaves the entry.
> Windeco still uses oxywin colors.
> =
> What I did to ensure this is not some strange local thing:
> Logged out
> Removed cache files from themes (oxygen and air, each two files. No o=
ther files were there from plasma)
> Removed kde-install-path
> Reinstalled
> Logged in again
> Nothing changed
> =
> What I am going to do now:
> rebuild kdelibs and kdebase and test again
none of this had anything to do with these changes, however. these were all=
little bugs that had crept into the codebase around repainting when the th=
eme changes. i've fixed the ones i've seen so far already.
but again, nothing to do with these changes. they would have been broken be=
fore this commit, too.
what is broken (so i can reproduce, test and fix) with unthemed svgs?
- Aaron
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6008/#review9136
-----------------------------------------------------------
On 2010-11-28 23:52:16, Aaron Seigo wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6008/
> -----------------------------------------------------------
> =
> (Updated 2010-11-28 23:52:16)
> =
> =
> Review request for Plasma.
> =
> =
> Summary
> -------
> =
> see: http://www.mail-archive.com/plasma-devel@kde.org/msg13494.html
> =
> this introduces a Theme object used by Svg to cache the rendering of svg'=
s asking to be colorized, but which are not part of the theme. this require=
s an independent cache and set of color files, therefore a second Theme obj=
ect. SvgPrivate::actualTheme() is thus overridden by SvgPrivate::cacheAndCo=
lorsTheme() whenever caching or colors are used.
> =
> there are two remaining defects of varying severity, though neither is ve=
ry high imho:
> =
> a) if the system color palette changes when the application is not runnin=
g (or an svg using such a theme is not running) the cache will not be dropp=
ed. this is an existing issue, however, not something introduce by this pat=
chset
> =
> b) the new system color theme is shared for performance reasons, but once=
created it is never deleted. it ought to be reference counted so it can be=
cleaned up after in use, but this is currently not done.
> =
> several other fixes crept into this patchset (sorry :/) including:
> =
> * not dropping the cache just because we change themes; this made sense w=
hen just plasma-desktop used this or when the apps using Plasma::Theme all =
used the same theme. this is no longer the case, really, and having applica=
tions changing themes randomly kicking the cache out from underneath other =
apps that may still be using it is undesirable. this does mean that cache f=
iles will accumulate. not sure that's a big issue as they don't tend to be =
large and are in an area marked as "cache" (so ripe for clean-without-care)
> =
> * consolidate the signal/slot connections in SvgPrivate::checkColorHints,=
and now the check is consistent on all paths (previously, it wasn't!)
> =
> * missing (and possible cause of cache key ambiguity) separator in CACHE_=
ID_WITH_SIZE
> =
> * cleanups such as getting rid of superfluous use of Plasma:: namespacing=
in code that is now in libplasma, such as the stylesheeting. (it was from =
a plasmoid sebas wrote originally, iirc, explaining the historical reason f=
or the explicit namespacing)
> =
> in any case, consider this a draft at this stage. i'm interested in getin=
g feedback, improvements and testing.
> =
> =
> Diffs
> -----
> =
> /trunk/KDE/kdelibs/plasma/private/svg_p.h 1199366 =
> /trunk/KDE/kdelibs/plasma/svg.cpp 1201684 =
> /trunk/KDE/kdelibs/plasma/theme.cpp 1201685 =
> =
> Diff: http://svn.reviewboard.kde.org/r/6008/diff
> =
> =
> Testing
> -------
> =
> just running normal plasma-desktop and what i use. needs testing with svg=
's that will actually rely on this feature.
> =
> =
> Thanks,
> =
> Aaron
> =
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/6008/">http://svn.reviewboard.kde.org/r/6008/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On December 5th, 2010, 2:50 p.m., <b>Manuel \
Mommertz</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">It is now even worse then before. Unthemed graphics still use the colors \
from plasma theme but don't get informed if the theme changes. this means, the \
colors that are used when first rendering the graphics stay even if I switch the \
theme. The plasma elements itself don't get rerendered on theme change. Only \
graphics that have to be rerendered for another reason (resizing a widget, ...) get \
the svg's from the new activated theme.</pre> </blockquote>
<p>On December 5th, 2010, 3:12 p.m., <b>Marco Martin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">well, they shouldn't \
be informed on theme changes in this case...</pre> </blockquote>
<p>On December 5th, 2010, 3:38 p.m., <b>Manuel Mommertz</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">right, but on \
colorscheme changes. with doesn't happen.</pre> </blockquote>
<p>On December 5th, 2010, 7:51 p.m., <b>Aaron Seigo</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">"Unthemed graphics \
still use the colors from plasma theme but don't get informed if the theme \
changes."
unthemed graphics never use colors from the plasma theme. they either use no colors, \
or they use the system colors. in which case are unthemed graphics using the color \
scheme from the plasma theme?
"the colors that are used when first rendering the graphics stay even if I \
switch the theme."
of course. the theme is not relevant. you get to pick between "themed" and \
"unthemed".
"The plasma elements itself don't get rerendered on theme change."
which plasma elements?
"Only graphics that have to be rerendered for another reason (resizing a widget, \
...) get the svg's from the new activated theme."
are you saying that NO svg's (themed or unthemed) are being updated? because that \
works here.
"right, but on colorscheme changes. with doesn't happen."
do you mean the KDE color scheme change? e.g. when you change the colorscheme in the \
Colors control panel?
i'm quite confused now by what you mean. can you give me a clear, simple use case \
with detailed steps of reproduction so that i may identify and reproduce the problem \
and subsequently fix it? thanks.</pre> </blockquote>
<p>On December 5th, 2010, 8:08 p.m., <b>Manuel Mommertz</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">http://img502.imageshack.us/img502/2729/plasmadesktopxk7517.png
Steps I did before taking this screenshot:
Logged in while Oxygen was the selected theme.
Switched theme to Air.
Noticed: After switching all graphics stay unchanged. The folderview changed after \
some 10-20 seconds. The handle (seen next to folderview) changed to air after I \
unhovered folderview and hovered it again. Panel stays unchanged. The Entry in the \
taskbar gets the hover-graphic from air while falling back to oxygen when mouse \
leaves the entry. Windeco still uses oxywin colors.
What I did to ensure this is not some strange local thing:
Logged out
Removed cache files from themes (oxygen and air, each two files. No other files were \
there from plasma) Removed kde-install-path
Reinstalled
Logged in again
Nothing changed
What I am going to do now:
rebuild kdelibs and kdebase and test again</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">none of this had \
anything to do with these changes, however. these were all little bugs that had crept \
into the codebase around repainting when the theme changes. i've fixed the ones \
i've seen so far already.
but again, nothing to do with these changes. they would have been broken before this \
commit, too.
what is broken (so i can reproduce, test and fix) with unthemed svgs?</pre>
<br />
<p>- Aaron</p>
<br />
<p>On November 28th, 2010, 11:52 p.m., Aaron Seigo wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma.</div>
<div>By Aaron Seigo.</div>
<p style="color: grey;"><i>Updated 2010-11-28 23:52:16</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">see: http://www.mail-archive.com/plasma-devel@kde.org/msg13494.html
this introduces a Theme object used by Svg to cache the rendering of svg's asking \
to be colorized, but which are not part of the theme. this requires an independent \
cache and set of color files, therefore a second Theme object. \
SvgPrivate::actualTheme() is thus overridden by SvgPrivate::cacheAndColorsTheme() \
whenever caching or colors are used.
there are two remaining defects of varying severity, though neither is very high \
imho:
a) if the system color palette changes when the application is not running (or an svg \
using such a theme is not running) the cache will not be dropped. this is an existing \
issue, however, not something introduce by this patchset
b) the new system color theme is shared for performance reasons, but once created it \
is never deleted. it ought to be reference counted so it can be cleaned up after in \
use, but this is currently not done.
several other fixes crept into this patchset (sorry :/) including:
* not dropping the cache just because we change themes; this made sense when just \
plasma-desktop used this or when the apps using Plasma::Theme all used the same \
theme. this is no longer the case, really, and having applications changing themes \
randomly kicking the cache out from underneath other apps that may still be using it \
is undesirable. this does mean that cache files will accumulate. not sure that's \
a big issue as they don't tend to be large and are in an area marked as \
"cache" (so ripe for clean-without-care)
* consolidate the signal/slot connections in SvgPrivate::checkColorHints, and now the \
check is consistent on all paths (previously, it wasn't!)
* missing (and possible cause of cache key ambiguity) separator in CACHE_ID_WITH_SIZE
* cleanups such as getting rid of superfluous use of Plasma:: namespacing in code \
that is now in libplasma, such as the stylesheeting. (it was from a plasmoid sebas \
wrote originally, iirc, explaining the historical reason for the explicit \
namespacing)
in any case, consider this a draft at this stage. i'm interested in geting \
feedback, improvements and testing.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">just running normal plasma-desktop and what i use. needs testing with \
svg's that will actually rely on this feature.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/KDE/kdelibs/plasma/private/svg_p.h <span style="color: \
grey">(1199366)</span></li>
<li>/trunk/KDE/kdelibs/plasma/svg.cpp <span style="color: \
grey">(1201684)</span></li>
<li>/trunk/KDE/kdelibs/plasma/theme.cpp <span style="color: \
grey">(1201685)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6008/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic