<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/119336/">https://git.reviewboard.kde.org/r/119336/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On July 18th, 2014, 10:54 a.m. UTC, <b>David Edmundson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/119336/diff/3/?file=290908#file290908line121" style="color: black; font-weight: bold; text-decoration: underline;">src/declarativeimports/core/framesvgitem.cpp</a>
<span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">121</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">m_lastParent</span><span class="o">-></span><span class="n">removeChildNode</span><span class="p">(</span><span class="k">this</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">1) This leaks.<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
if you remove a node from a parent you have to delete it yourself.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">2) You're calling this from something which is looping through childCount(),so you'll end up either crashing or skipping items.</p></pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">yeah, i noticed the crashes :p<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
(was from an old version of your branch tough)</p></pre>
<br />
<p>- Marco</p>
<br />
<p>On July 17th, 2014, 8:17 p.m. UTC, Marco Martin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks and Plasma.</div>
<div>By Marco Martin.</div>
<p style="color: grey;"><i>Updated July 17, 2014, 8:17 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This is a derivative of https://git.reviewboard.kde.org/r/119330/</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It has a much simpler codebase and it doesn't touch framesvg in the library (and doesn't make things public)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">the important differences are two, that are imo 100% necessary to maintain a pixel perfect rendering (sacrificing that is a regression simply not acceptable in any case, even for non default themes, ever). At the same time avoids duplication of framesvg code in framesvgitem.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">potential issues:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> e037203748 support for tiling still need porting<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
</em> yes, it uses a qpainter, that means another copy: but again is necessary as framesvg knows how to render the end result pixel perfect, since for many themes the end piece is <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">not</em> the simple rendered element id.<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
* yes, the final scaled texture is still uploaded as a whole, it only avoids to do it too often (like in animations) with event compression, again, only way to be sure it's correctly rendered all the time.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The latter two points can have the following optimizations:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Iff the frame does not have an overlay and does not have composeoverborders set, the following can be done:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> use Svg::image() to fetch the pixmap of the piece, since in that case would be valid<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
</em> resize the framesvg one single time, at a fixed size , like something > 256x256 (256 is not random thing, since we have 8 bits per channel, usually gradients will have no more than 256 stops) and disable the resize timer, this way we are even sure that only one image per prefix will be stored in cache</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I should add regarding the last two optimization points: i would like to see some real benchmarks about them, or i would not consider then necessary until then.</p></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>tests/dialog.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>tests/testborders.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>examples/applets/widgetgallery/contents/ui/Buttons.qml <span style="color: grey">(379585f)</span></li>
<li>examples/applets/widgetgallery/contents/ui/Menu.qml <span style="color: grey">(1336c42)</span></li>
<li>examples/applets/widgetgallery/contents/ui/standalonemain.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/declarativeimports/core/framesvgitem.h <span style="color: grey">(e155f6a)</span></li>
<li>src/declarativeimports/core/framesvgitem.cpp <span style="color: grey">(8320212)</span></li>
<li>src/declarativeimports/core/svgitem.cpp <span style="color: grey">(1ed0631)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119336/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>