[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request 119336: Convert FrameSvg to 9 textures: different approach
From:       "Marco Martin" <notmart () gmail ! com>
Date:       2014-07-29 9:10:36
Message-ID: 20140729091036.15440.16527 () probe ! kde ! org
[Download RAW message or body]

--===============6556782130650191830==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119336/
-----------------------------------------------------------

(Updated July 29, 2014, 9:10 a.m.)


Status
------

This change has been discarded.


Review request for KDE Frameworks and Plasma.


Repository: plasma-framework


Description
-------

This is a derivative of https://git.reviewboard.kde.org/r/119330/

It has a much simpler codebase and it doesn't touch framesvg in the library (and \
doesn't make things public)

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.

potential issues:
* e037203748 support for tiling still need porting
* 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 *not* the simple rendered element id.
* 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.

The latter two points can have the following optimizations:
Iff the frame does not have an overlay and does not have composeoverborders set, the \
                following can be done:
* use Svg::image() to fetch the pixmap of the piece, since in that case would be \
                valid
* 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

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.


Diffs
-----

  tests/dialog.qml PRE-CREATION 
  tests/testborders.qml PRE-CREATION 
  examples/applets/widgetgallery/contents/ui/Buttons.qml 379585f 
  examples/applets/widgetgallery/contents/ui/Menu.qml 1336c42 
  examples/applets/widgetgallery/contents/ui/standalonemain.qml PRE-CREATION 
  src/declarativeimports/core/framesvgitem.h e155f6a 
  src/declarativeimports/core/framesvgitem.cpp 8320212 
  src/declarativeimports/core/svgitem.cpp 1ed0631 

Diff: https://git.reviewboard.kde.org/r/119336/diff/


Testing
-------


Thanks,

Marco Martin


--===============6556782130650191830==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<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 />




<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been \
discarded.</h1>  </td>
 </tr>
</table>
<br />


<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 29, 2014, 9:10 a.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 &gt; \
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>


--===============6556782130650191830==--



_______________________________________________
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