Merge lp:~vanvugt/qtmir/unstretch into lp:qtmir
| Status: | Rejected | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Rejected by: | Daniel d'Andrada on 2015-09-11 | ||||||||
| Proposed branch: | lp:~vanvugt/qtmir/unstretch | ||||||||
| Merge into: | lp:qtmir | ||||||||
| Diff against target: |
32 lines (+16/-1) 1 file modified
src/modules/Unity/Application/mirsurfaceitem.cpp (+16/-1) |
||||||||
| To merge this branch: | bzr merge lp:~vanvugt/qtmir/unstretch | ||||||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Daniel d'Andrada (community) | 2015-08-21 | Disapprove on 2015-09-11 | |
| PS Jenkins bot | continuous-integration | Approve on 2015-08-21 | |
|
Review via email:
|
|||
Commit Message
Implement non-stretchy resizing. This partly fixes LP: #1466510
and probably other use cases too.
Although the delay is still there, any stretching you do see
will be limited to the pixels on the right and bottom edges.
Description of the Change
Reducing the delay is left as an exercise for the reader. :)
| Gerry Boland (gerboland) wrote : | # |
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:366
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
| Daniel van Vugt (vanvugt) wrote : | # |
For rotation, yes I think we can maybe do better but not block this branch on that. And for general desktop resizing, we should not attempt to do anything "better".
There's a reason why you see the same lagging resize on other operating systems. I've seen it on Windows 10 and ChromeOS recently too. The reason is that it's more desirable to not "trust" the client, and never wait for the client to do anything, than it is to delay screen updates (miss frames) keeping things visually synchronized. A lagging client behind a smooth shell is better than a stuttering (but synchronized) shell+client.
Mir is built on the design principle that we never trust the client or wait for the client. Mir just acts on the latest information it has received at the time. And Unity8 should probably do the same.
What does help to reduce the visual lag in resizing is the length of the buffer queue. So MIR_SERVER_
That all said, I think any additional work to improve the fix for the attached bug should be done separately.
| Daniel van Vugt (vanvugt) wrote : | # |
Also, "weird borders" is an overstatement. The goal is to try and make most of the client's pixels appear to not move or stretch during resizing. The only weirdness is on the right and bottom edges, only during rapid resizing, and only a small percentage of the overall surface is affected. In fact, in most cases where you're resizing a surface whose edges are one uniform colour you will not see any clamping artefacts at all. So this is much more desirable and less noticeable than having every single pixel stretched.
| Daniel van Vugt (vanvugt) wrote : | # |
I've now clarified the bug so that this branch is not seen as a full fix. It's just a related branch.
| Daniel d'Andrada (dandrader) wrote : | # |
This won't allow shell to intentionally scale window (ie,"strech" it but keeping the original aspect ratio).
lp:~dandrader/qtmir/mirSurface solve this issue by giving QML code the freedom to choose whether it wants to scale/stretch a surface or not. So it can implement resizing by stretching or clamping.
| Daniel van Vugt (vanvugt) wrote : | # |
Fair point. But can you point to a use case I can test for that?
We still need this change for the generic resizing case.
| Daniel van Vugt (vanvugt) wrote : | # |
What is the use case for wanting resizing by stretching? Mir had that (accidentally) for a while and it was widely hated because the stretching was so distracting. So now Mir always uses clamping, like every other desktop OS.
| Daniel d'Andrada (dandrader) wrote : | # |
On 27/08/2015 03:45, Daniel van Vugt wrote:
> What is the use case for wanting resizing by stretching? Mir had that (accidentally) for a while and it was widely hated because the stretching was so distracting. So now Mir always uses clamping, like every other desktop OS.
There's no use case for resizing by streching. But there is for
stretching for the sake of scale it. So you say this branch does not
impede QML from scaling (ie, stretching without changing the aspect
ratio) a surface in QML?
If so, I will try it out next week (once I'm back from the sprint) with
qml-demo-shell and tell you if that's indeed the case.
By the way, would be great if you rebased this against
lp:~dandrader/qtmir/mirSurface as it changes a lot of stuff and it's
gonna land ASAP.
| Daniel van Vugt (vanvugt) wrote : | # |
If you implement scale, then you still want this branch. It would just change to something like:
qreal u = static_
qreal v = static_
| Daniel van Vugt (vanvugt) wrote : | # |
Just tested the unity8 desktop session. The stretching is quite bad during window resizing so it desperately needs this.
| Daniel d'Andrada (dandrader) wrote : | # |
On 03/09/15 06:52, Daniel van Vugt wrote:
> Just tested the unity8 desktop session. The stretching is quite bad during window resizing so it desperately needs this.
I meant to get to it this week. Even started but other things kept
getting in between.
My only problem with this is that it closes the door for a scaling
option. So I was working on a patch that does this stuff but also allows
QML to scale (ie, streching at will) if it wants to.
| Daniel van Vugt (vanvugt) wrote : | # |
It does not close the door on scaling. Scroll up to find I demonstrated a solution on 2015-08-31.
| Daniel d'Andrada (dandrader) wrote : | # |
On 08/09/15 03:07, Daniel van Vugt wrote:
> It does not close the door on scaling. Scroll up to find I demonstrated a solution on 2015-08-31.
But I think we need to have the scaling option included in this MP.
Otherwise it can block features like live thumbnails that are going to
be used in the desktop window switcher.
At the moment I'm thinking of an API like this:
MirSurfaceItem.
| Daniel d'Andrada (dandrader) wrote : | # |
This is what I meant:
https:/
Unmerged revisions
- 366. By Daniel van Vugt on 2015-08-21
-
Implement non-stretchy resizing. This fixes most of LP: #1466510
and probably other use cases too.Although the delay is still there, any stretching you do see
will be limited to the pixels on the right and bottom edges. - 365. By CI Train Bot Account on 2015-08-20
-
Releasing 0.4.5+15.
04.20150820- 0ubuntu1 - 364. By Gerry Boland on 2015-08-20
-
Hotfix to work around bug 1483752

This indeed will stop the stretching, but will replace it with an app surface with weird borders instead. This is a small visual improvement, but will mask the core issue. So I would not consider it a proper fix for the attached bug.