[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Use QElapsedTimer to measure animation delay
From: Thomas_Lübking <thomas.luebking () web ! de>
Date: 2012-11-14 7:12:26
Message-ID: 20121114071226.3216.33660 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Nov. 14, 2012, 5:22 a.m., Martin Gräßlin wrote:
> > what about moving the QElapsedTimer into AnimData and start the timer once the \
> > AnimData is started and stop it once the start time has been reached? That way in \
> > most cases there would never be a timer used at all.
QElapsedTimer is no active timer like Q[Basic]Timer but just stores the "time" \
(difference to global reference) when "started" and compares that with the "time" \
(difference to global reference) when stopped. It's much more like QDateTime than \
like QTimer - basically it stores two signed 64bit values when accessed (for that \
reason it cannot be stopped)
As it is now, it acts like a singleton monotic clock instance (it's static across all \
AnimationEffects) - i can actually not think of a cheaper implementation =)
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107250/#review21962
-----------------------------------------------------------
On Nov. 9, 2012, 10:53 p.m., Thomas Lübking wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107250/
> -----------------------------------------------------------
>
> (Updated Nov. 9, 2012, 10:53 p.m.)
>
>
> Review request for kwin and Martin Gräßlin.
>
>
> Description
> -------
>
> Assuming the daybreak *is* relevant, this stores the start time time and date \
> including.
>
> This addresses bug 306186.
> http://bugs.kde.org/show_bug.cgi?id=306186
>
>
> Diffs
> -----
>
> kwin/libkwineffects/kwinanimationeffect.cpp 0e126dc
> kwin/libkwineffects/anidata.cpp 3bb970f
> kwin/libkwineffects/anidata_p.h 33d8c03
> kwin/libkwineffects/kwinanimationeffect.h 2ffaa22
>
> Diff: http://git.reviewboard.kde.org/r/107250/diff/
>
>
> Testing
> -------
>
> It compiles.
>
>
> Thanks,
>
> Thomas Lübking
>
>
[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://git.reviewboard.kde.org/r/107250/">http://git.reviewboard.kde.org/r/107250/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On November 14th, 2012, 5:22 a.m., <b>Martin \
Gräßlin</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;">what about moving the QElapsedTimer into AnimData and start the timer \
once the AnimData is started and stop it once the start time has been reached? That \
way in most cases there would never be a timer used at all.</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;">QElapsedTimer is no \
active timer like Q[Basic]Timer but just stores the "time" (difference to \
global reference) when "started" and compares that with the \
"time" (difference to global reference) when stopped. It's much more \
like QDateTime than like QTimer - basically it stores two signed 64bit values when \
accessed (for that reason it cannot be stopped)
As it is now, it acts like a singleton monotic clock instance (it's static across \
all AnimationEffects) - i can actually not think of a cheaper implementation =)</pre> \
<br />
<p>- Thomas</p>
<br />
<p>On November 9th, 2012, 10:53 p.m., Thomas Lübking wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/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 kwin and Martin Gräßlin.</div>
<div>By Thomas Lübking.</div>
<p style="color: grey;"><i>Updated Nov. 9, 2012, 10:53 p.m.</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;">Assuming the daybreak *is* relevant, this stores the start time time and \
date including.</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;">It compiles.</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=306186">306186</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kwin/libkwineffects/kwinanimationeffect.cpp <span style="color: \
grey">(0e126dc)</span></li>
<li>kwin/libkwineffects/anidata.cpp <span style="color: grey">(3bb970f)</span></li>
<li>kwin/libkwineffects/anidata_p.h <span style="color: grey">(33d8c03)</span></li>
<li>kwin/libkwineffects/kwinanimationeffect.h <span style="color: \
grey">(2ffaa22)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107250/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic