[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-hardware-devel
Subject: Re: [Kde-hardware-devel] Review Request 119597: Brightness fixes, part 2: Implement brightnessStep l
From: "Nikita Skovoroda" <chalkerx () gmail ! com>
Date: 2014-08-03 22:17:31
Message-ID: 20140803221731.20974.76055 () probe ! kde ! org
[Download RAW message or body]
--===============2054210702020072163==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119597/
-----------------------------------------------------------
(Updated Авг. 3, 2014, 10:17 п.п.)
Review request for Solid and Àlex Fiestas.
Repository: powerdevil
Description (updated)
-------
This is a continuation of https://git.reviewboard.kde.org/r/119559/.
Now that all layers are aware of the actual integer brightness value and \
the maximum brightness value, rework brightness up/down actions. See \
background explanation in previous RR.
____
Implement brightnessStep logic.
Introduce brightnessStep, brightnessStepMax, brightnessStepChanged, \
setBrightnessStep D-Bus endpoints in \
org.kde.Solid.PowerManagement.Actions.BrightnessControl. Introduce \
correspoding D-Bus endpoints in \
org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl.
Use step-based logic for increase/decrease brightness actions.
This makes the increase/decrease brightness actions behave as if the \
brightness steps are pre-calculated.
Also, brightness percentage is now rounded everywhere (it was just cast to \
int without rounding before), now that the inner logic does not depend on \
the percentage anymore. Before this patch I was not sure if this would make \
things look worse or not. ____
An illustraton:
Before: http://oserv.org/tests/kde/powerdevil/brightness_before.php
After: http://oserv.org/tests/kde/powerdevil/brightness_after.php, this \
script shares the same code for calculating steps count.
Diffs
-----
daemon/powerdevilbackendinterface.cpp de15302
daemon/actions/bundled/brightnesscontrol.h 8ae3157
daemon/actions/bundled/brightnesscontrol.cpp 8d06bc2
daemon/actions/bundled/keyboardbrightnesscontrol.h 9f12537
daemon/actions/bundled/keyboardbrightnesscontrol.cpp 075a984
daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.BrightnessControl.xml \
abe33c6 daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl.xml \
ea4a504 daemon/backends/hal/powerdevilhalbackend.h a261a65
daemon/backends/hal/powerdevilhalbackend.cpp b9ab9aa
daemon/backends/upower/powerdevilupowerbackend.h 2b51f30
daemon/backends/upower/powerdevilupowerbackend.cpp 92a6cdd
daemon/powerdevilbackendinterface.h d79ba46
Diff: https://git.reviewboard.kde.org/r/119597/diff/
Testing
-------
Works for me, shortcuts now follow persistent brightness steps.
Works on acpi_video0 with 10 steps, asus::kbd_backlight with 3 steps, and \
intel_backlight notebook with 4000+ steps.
The BackendInterface::calculateStepsCount() logic was separately tested for \
all possible max_brightness values.
Only upower backend was tested.
HAL backend uses variable m_cachedKeyboardBrightness before it is \
initialized, and I am not the one who wrote it that way.
Thanks,
Nikita Skovoroda
--===============2054210702020072163==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<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/119597/">https://git.reviewboard.kde.org/r/119597/</a>
</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 Solid and Àlex Fiestas.</div>
<div>By Nikita Skovoroda.</div>
<p style="color: grey;"><i>Updated Авг. 3, 2014, 10:17 п.п.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
powerdevil
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
(updated)</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 continuation of \
https://git.reviewboard.kde.org/r/119559/.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Now that all layers are aware of the actual integer brightness \
value and the maximum brightness value, rework brightness up/down \
actions.<br style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;" /> See background explanation \
in previous RR.</p> <hr style="text-rendering: inherit;margin: 0;padding: \
0;white-space: normal;border: 1px solid #ddd;line-height: inherit;" /> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Implement brightnessStep logic.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Introduce brightnessStep, brightnessStepMax, \
brightnessStepChanged, setBrightnessStep D-Bus endpoints in \
org.kde.Solid.PowerManagement.Actions.BrightnessControl.<br style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;" /> Introduce correspoding D-Bus endpoints in \
org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Use step-based logic for increase/decrease \
brightness actions.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">This makes \
the increase/decrease brightness actions behave as if the brightness steps \
are pre-calculated.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Also, \
brightness percentage is now rounded everywhere (it was just cast to int \
without rounding before), now that the inner logic does not depend on the \
percentage anymore.<br style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;" /> Before this patch I was not \
sure if this would make things look worse or not.</p> <hr \
style="text-rendering: inherit;margin: 0;padding: 0;white-space: \
normal;border: 1px solid #ddd;line-height: inherit;" /> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">An illustraton:<br style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: \
normal;" />
Before: http://oserv.org/tests/kde/powerdevil/brightness_before.php<br \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" />
After: http://oserv.org/tests/kde/powerdevil/brightness_after.php, this \
script shares the same code for calculating steps count.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Works for me, shortcuts now \
follow persistent brightness steps.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Works on acpi_video0 with 10 steps, asus::kbd_backlight with 3 \
steps, and intel_backlight notebook with 4000+ steps.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The BackendInterface::calculateStepsCount() \
logic was separately tested for all possible max_brightness values.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Only upower backend was tested.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">HAL backend uses variable \
m_cachedKeyboardBrightness before it is initialized, and I am not the one \
who wrote it that way.</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>daemon/powerdevilbackendinterface.cpp <span style="color: \
grey">(de15302)</span></li>
<li>daemon/actions/bundled/brightnesscontrol.h <span style="color: \
grey">(8ae3157)</span></li>
<li>daemon/actions/bundled/brightnesscontrol.cpp <span style="color: \
grey">(8d06bc2)</span></li>
<li>daemon/actions/bundled/keyboardbrightnesscontrol.h <span style="color: \
grey">(9f12537)</span></li>
<li>daemon/actions/bundled/keyboardbrightnesscontrol.cpp <span \
style="color: grey">(075a984)</span></li>
<li>daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.BrightnessControl.xml \
<span style="color: grey">(abe33c6)</span></li>
<li>daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl.xml \
<span style="color: grey">(ea4a504)</span></li>
<li>daemon/backends/hal/powerdevilhalbackend.h <span style="color: \
grey">(a261a65)</span></li>
<li>daemon/backends/hal/powerdevilhalbackend.cpp <span style="color: \
grey">(b9ab9aa)</span></li>
<li>daemon/backends/upower/powerdevilupowerbackend.h <span style="color: \
grey">(2b51f30)</span></li>
<li>daemon/backends/upower/powerdevilupowerbackend.cpp <span style="color: \
grey">(92a6cdd)</span></li>
<li>daemon/powerdevilbackendinterface.h <span style="color: \
grey">(d79ba46)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119597/diff/" \
style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============2054210702020072163==--
_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic