Merge lp:~unity-team/qtmir/dpr into lp:qtmir
| Status: | Work in progress |
|---|---|
| Proposed branch: | lp:~unity-team/qtmir/dpr |
| Merge into: | lp:qtmir |
| Diff against target: |
722 lines (+187/-116) (has conflicts) 14 files modified
debian/changelog (+9/-0) src/modules/Unity/Application/mirsurface.cpp (+63/-61) src/modules/Unity/Application/mirsurface.h (+8/-8) src/modules/Unity/Application/mirsurfaceinterface.h (+8/-8) src/modules/Unity/Application/mirsurfaceitem.cpp (+36/-16) src/modules/Unity/Application/mirsurfaceitem.h (+1/-0) src/platforms/mirserver/qteventfeeder.cpp (+13/-6) src/platforms/mirserver/qteventfeeder.h (+1/-0) src/platforms/mirserver/screen.cpp (+26/-5) src/platforms/mirserver/screen.h (+5/-2) src/platforms/mirserver/screencontroller.cpp (+2/-2) src/platforms/mirserver/screenwindow.cpp (+5/-0) src/platforms/mirserver/screenwindow.h (+2/-0) tests/modules/common/fake_mirsurface.h (+8/-8) Text conflict in debian/changelog |
| To merge this branch: | bzr merge lp:~unity-team/qtmir/dpr |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Unity8 CI Bot | continuous-integration | Needs Fixing on 2016-03-24 | |
| Daniel d'Andrada (community) | 2015-04-27 | Approve on 2016-01-08 | |
| PS Jenkins bot | continuous-integration | Needs Fixing on 2016-01-07 | |
|
Review via email:
|
|||
Commit Message
Add device pixel ratio support
Description of the Change
* Are there any related MPs required for this MP to build/function as expected? Please list.
Nothing depends on this directly, but to do a full test, you'll need:
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Y
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:326
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| Gerry Boland (gerboland) wrote : | # |
* Are there any related MPs required for this MP to build/function as expected? Please list.
Nothing depends on this directly, but to do a full test, you'll need:
https:/
https:/
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Y
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:326
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
In src/modules/
"""
- int qmlWidth = (int)width();
- int qmlHeight = (int)height();
+ const qreal dpr = devicePixelRatio();
+ int qmlWidth = (int)width() * dpr;
+ int qmlHeight = (int)height() * dpr;
"""
Now they're no longer representing the qml width and height, thus the naming is misleading.
Better calling them something like newMirWidth and newMirHeight.
Also it would be more correct to cast to int *after* the dpr multiplication: (int)(width() * dpr)
| Daniel d'Andrada (dandrader) wrote : | # |
In src/modules/
"""
- mir::geometry::Size newMirSize(
+ mir::geometry::Size newMirSize(
- setImplicitSize
+ setImplicitSize
}
}
"""
The implicit size should not be scaled.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:330
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:331
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:333
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:334
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:335
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:336
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:337
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:338
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
The debian/changelog entry is misplaced. Likely the result of a bad merge with trunk.
| Daniel d'Andrada (dandrader) wrote : | # |
The only way I see of saving MirSurface from knowing about DPR is passing it the event data directly as parameters instead of giving it the whole QEvent.
Eg:
MirSurface:
Would be:
MirSurface:
Which is actually not a bad thing.
| Gerry Boland (gerboland) wrote : | # |
> The only way I see of saving MirSurface from knowing about DPR is passing it
> the event data directly as parameters instead of giving it the whole QEvent.
>
> Eg:
>
> MirSurface:
>
> Would be:
>
> MirSurface:
> Qt::KeyboardMod
>
> Which is actually not a bad thing.
For touch events too?
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:340
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
On 18/09/15 08:44, Gerry Boland wrote:
>> The only way I see of saving MirSurface from knowing about DPR is passing it
>> the event data directly as parameters instead of giving it the whole QEvent.
>>
>> Eg:
>>
>> MirSurface:
>>
>> Would be:
>>
>> MirSurface:
>> Qt::KeyboardMod
>>
>> Which is actually not a bad thing.
> For touch events too?
You'll have to to copy the QList<QTouchEve
you can transform the points. Is that what you're afraid of (performance
hit)?
| Gerry Boland (gerboland) wrote : | # |
> On 18/09/15 08:44, Gerry Boland wrote:
> >> The only way I see of saving MirSurface from knowing about DPR is passing
> it
> >> the event data directly as parameters instead of giving it the whole
> QEvent.
> >>
> >> Eg:
> >>
> >> MirSurface:
> >>
> >> Would be:
> >>
> >> MirSurface:
> >> Qt::KeyboardMod
> >>
> >> Which is actually not a bad thing.
> > For touch events too?
>
> You'll have to to copy the QList<QTouchEve
> you can transform the points. Is that what you're afraid of (performance
> hit)?
Well more generally, it seems to be so much work just for a multiplication. Is why I'm hesitating.
| Daniel d'Andrada (dandrader) wrote : | # |
In mirsurfaceitem.cpp:
"""
m_lastTouchEven
"""
????
| Daniel d'Andrada (dandrader) wrote : | # |
In mirsurfceitem.cpp:
"""
Note: all geometry is in device-pixels, except that contained in variables with the
"""
s/device-
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:341
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
"""
const float kP = mir_touch_
"""
Not sure if the pressure axis has any relationship with x & y dimensions to deserve the dpr conversion.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:343
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:344
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:345
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:347
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:348
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:350
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:351
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:352
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:354
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:355
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
In MirSurfaceItem:
| Daniel d'Andrada (dandrader) wrote : | # |
Still in MirSurfaceItem:
"""
qreal u = targetRect.width() / textureSize.width() * dpr;
"""
Would be better expressed as:
"""
qreal u = (targetRect.width() * dpr) / textureSize.
"""
To make it obvious that your're converting targetRect.width() from DIP (or layout pixels) to actual/physical pixels, which is the unit of textureSize.
Likewise for the v coordinate.
| Daniel d'Andrada (dandrader) wrote : | # |
In src/platforms/
"""
qreal getDevicePixelR
{
return qGuiApp-
}
"""
Qt coding style doesn't use the "get" prefix for getters. I think we should stick to it unless there's a good reason to deviate.
| Daniel d'Andrada (dandrader) wrote : | # |
In QtEventFeeder:
"""
auto movement = QPointF(
"""
I think you meant:
"""
auto movement = QPointF(
"""
| Daniel d'Andrada (dandrader) wrote : | # |
Nitpick in Screen::Screen
"""
bool ok;
const int dpr = qGetEnvIntValue
m_devicePix
"""
You would be better off moving this whole snippet into a separate function instead of just the qGetEnvIntValue part (as it's used only once anyway). That would spare the constructor namespace from getting polluted with those helper variables ok and dpr.
PS: That's what happens when you re-review something. You start to nitpick :)
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:358
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Gerry Boland (gerboland) wrote : | # |
I can merge this into trunk just fine. LP confused?
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:360
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:360
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Michał Sawicz (saviq) wrote : | # |
Text conflict in debian/changelog
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:360
https:/
Executed test runs:
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Michał Sawicz (saviq) wrote : | # |
Text conflict in src/modules/
Text conflict in src/platforms/
Text conflict in tests/framework
3 conflicts encountered.
| Gerry Boland (gerboland) wrote : | # |
Marking WIP, needs rebasing on top of DGU work
Unmerged revisions
- 360. By Gerry Boland on 2016-01-07
-
Move DPR env var reading into dedicated function
- 359. By Gerry Boland on 2016-01-07
-
Typo in DPR calculation
- 358. By Gerry Boland on 2016-01-07
-
getDevicePixelRatio -> devicePixelRatio
- 357. By Gerry Boland on 2016-01-07
-
MirSurfaceItem:
:updatePaintNod e - move calculation around to clarify intention - 356. By Gerry Boland on 2016-01-07
-
MirSurfaceItem:
:updatePaintNod e Move dpr inside block where it is used - 355. By Gerry Boland on 2016-01-04
-
Merge trunk
- 354. By Gerry Boland on 2015-12-14
-
Fix scaling to render app surface correctly
- 353. By Gerry Boland on 2015-12-14
-
Add units to debug message
- 352. By Gerry Boland on 2015-12-14
-
Merge trunk
- 351. By Gerry Boland on 2015-11-17
-
Merge trunk

FAILED: Continuous integration, rev:326 jenkins. qa.ubuntu. com/job/ qtmir-ci/ 252/ jenkins. qa.ubuntu. com/job/ qtmir-vivid- amd64-ci/ 103/console jenkins. qa.ubuntu. com/job/ qtmir-vivid- armhf-ci/ 103 jenkins. qa.ubuntu. com/job/ qtmir-vivid- armhf-ci/ 103/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/qtmir- ci/252/ rebuild
http://