[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 116024: Port IconItem to native QSGTexture
From: "David Edmundson" <david () davidedmundson ! co ! uk>
Date: 2014-02-27 21:59:07
Message-ID: 20140227215907.18925.9270 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Feb. 27, 2014, 8:17 p.m., David Edmundson wrote:
> > src/declarativeimports/core/fadingnode.cpp, line 85
> > <https://git.reviewboard.kde.org/r/116024/diff/3/?file=246683#file246683line85>
> >
> > Despite my code being clearly right this doesn't work. (according to apitrace and \
> > then qDebug)
> > oldState is always 0
> >
> > This means we are binding textures every frame, which is what we wanted to avoid.
> >
> > I'm quite confused as to why.
I understand it now (I think)
If I have 2 icons, I will have 2 materials, but still only 1 shader.
oldState is used so that when SG batches operations I don't have to update all my \
uniforms if properties are the same between different materials being rendered in \
different nodes. It is not the previous state of the current material being updated.
Sorry for the noise.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116024/#review51129
-----------------------------------------------------------
On Feb. 27, 2014, 1:44 p.m., David Edmundson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116024/
> -----------------------------------------------------------
>
> (Updated Feb. 27, 2014, 1:44 p.m.)
>
>
> Review request for Plasma.
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> Port IconItem to native QSGTexture including the animation.
> This will save constantly uploading a new texture to OpenGL throughout the \
> animation.
>
> Diffs
> -----
>
> CMakeLists.txt 4bc47bf
> src/declarativeimports/core/CMakeLists.txt 97e9283
> src/declarativeimports/core/fadingnode.cpp PRE-CREATION
> src/declarativeimports/core/fadingnode_p.h PRE-CREATION
> src/declarativeimports/core/iconitem.h 26ee410
> src/declarativeimports/core/iconitem.cpp fed2f9b
>
> Diff: https://git.reviewboard.kde.org/r/116024/diff/
>
>
> Testing
> -------
>
> Test app: http://paste.kde.org/pl5pwdnel
>
>
> Thanks,
>
> David Edmundson
>
>
[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="https://git.reviewboard.kde.org/r/116024/">https://git.reviewboard.kde.org/r/116024/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On February 27th, 2014, 8:17 p.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/116024/diff/3/?file=246683#file246683line85" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/declarativeimports/core/fadingnode.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">85</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">oldState</span> <span class="o">||</span> <span \
class="n">oldState</span><span class="o">-></span><span class="n">source</span> \
<span class="o">!=</span> <span class="n">newState</span><span \
class="o">-></span><span class="n">source</span><span class="p">)</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;">Despite my code being \
clearly right this doesn't work. (according to apitrace and then qDebug)
oldState is always 0
This means we are binding textures every frame, which is what we wanted to avoid.
I'm quite confused as to why.</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;">I \
understand it now (I think) If I have 2 icons, I will have 2 materials, but still \
only 1 shader.
oldState is used so that when SG batches operations I don't have to update all my \
uniforms if properties are the same between different materials being rendered in \
different nodes. It is not the previous state of the current material being updated.
Sorry for the noise.</pre>
<br />
<p>- David</p>
<br />
<p>On February 27th, 2014, 1:44 p.m. UTC, David Edmundson wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma.</div>
<div>By David Edmundson.</div>
<p style="color: grey;"><i>Updated Feb. 27, 2014, 1:44 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;">Port IconItem to native QSGTexture including the animation. This will \
save constantly uploading a new texture to OpenGL throughout the animation.</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;">Test app: http://paste.kde.org/pl5pwdnel
</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>CMakeLists.txt <span style="color: grey">(4bc47bf)</span></li>
<li>src/declarativeimports/core/CMakeLists.txt <span style="color: \
grey">(97e9283)</span></li>
<li>src/declarativeimports/core/fadingnode.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/declarativeimports/core/fadingnode_p.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/declarativeimports/core/iconitem.h <span style="color: \
grey">(26ee410)</span></li>
<li>src/declarativeimports/core/iconitem.cpp <span style="color: \
grey">(fed2f9b)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/116024/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