Merge lp:~dandrader/qtmir/surfaceItemFillMode into lp:qtmir
| Status: | Superseded | ||||
|---|---|---|---|---|---|
| Proposed branch: | lp:~dandrader/qtmir/surfaceItemFillMode | ||||
| Merge into: | lp:qtmir | ||||
| Prerequisite: | lp:~unity-team/qtmir/multimonitorNext | ||||
| Diff against target: |
4413 lines (+2255/-802) 73 files modified
CMakeLists.txt (+2/-4) debian/changelog (+7/-0) debian/control (+2/-2) src/modules/Unity/Application/application.cpp (+42/-9) src/modules/Unity/Application/application.h (+7/-0) src/modules/Unity/Application/application_manager.cpp (+52/-12) src/modules/Unity/Application/application_manager.h (+3/-0) src/modules/Unity/Application/mirbuffersgtexture.cpp (+18/-10) src/modules/Unity/Application/mirsurface.cpp (+40/-18) src/modules/Unity/Application/mirsurface.h (+12/-1) src/modules/Unity/Application/mirsurfaceinterface.h (+6/-0) src/modules/Unity/Application/mirsurfaceitem.cpp (+49/-5) src/modules/Unity/Application/mirsurfaceitem.h (+9/-0) src/modules/Unity/Application/session.cpp (+40/-2) src/modules/Unity/Application/session.h (+1/-0) src/modules/Unity/Application/session_interface.h (+1/-0) tests/CMakeLists.txt (+1/-0) tests/framework/CMakeLists.txt (+48/-0) tests/framework/fake_desktopfilereader.cpp (+68/-0) tests/framework/fake_desktopfilereader.h (+22/-21) tests/framework/fake_mirsurface.cpp (+212/-0) tests/framework/fake_mirsurface.h (+56/-137) tests/framework/fake_session.cpp (+113/-0) tests/framework/fake_session.h (+35/-57) tests/framework/mock_application_controller.cpp (+129/-0) tests/framework/mock_application_controller.h (+22/-99) tests/framework/mock_desktop_file_reader.cpp (+117/-0) tests/framework/mock_desktop_file_reader.h (+20/-85) tests/framework/mock_display.cpp (+35/-0) tests/framework/mock_display.h (+6/-2) tests/framework/mock_display_configuration.cpp (+25/-0) tests/framework/mock_display_configuration.h (+4/-0) tests/framework/mock_gl_display_buffer.cpp (+30/-0) tests/framework/mock_gl_display_buffer.h (+3/-9) tests/framework/mock_main_loop.cpp (+28/-0) tests/framework/mock_main_loop.h (+5/-8) tests/framework/mock_mir_session.cpp (+63/-0) tests/framework/mock_mir_session.h (+13/-20) tests/framework/mock_proc_info.cpp (+35/-0) tests/framework/mock_proc_info.h (+8/-7) tests/framework/mock_prompt_session.cpp (+33/-0) tests/framework/mock_prompt_session.h (+3/-0) tests/framework/mock_prompt_session_manager.cpp (+33/-0) tests/framework/mock_prompt_session_manager.h (+3/-0) tests/framework/mock_renderable.cpp (+33/-0) tests/framework/mock_renderable.h (+2/-1) tests/framework/mock_session.cpp (+69/-0) tests/framework/mock_session.h (+8/-30) tests/framework/mock_settings.cpp (+40/-0) tests/framework/mock_settings.h (+7/-11) tests/framework/mock_shared_wakelock.cpp (+61/-0) tests/framework/mock_shared_wakelock.h (+8/-33) tests/framework/mock_surface.cpp (+39/-0) tests/framework/mock_surface.h (+5/-4) tests/framework/qtmir_test.cpp (+98/-1) tests/framework/qtmir_test.h (+14/-106) tests/framework/stub_input_channel.cpp (+52/-0) tests/framework/stub_input_channel.h (+8/-18) tests/framework/stub_scene_surface.cpp (+103/-0) tests/framework/stub_scene_surface.h (+41/-49) tests/mirserver/Screen/CMakeLists.txt (+1/-1) tests/mirserver/ScreenController/CMakeLists.txt (+4/-1) tests/modules/Application/CMakeLists.txt (+12/-6) tests/modules/ApplicationManager/CMakeLists.txt (+7/-5) tests/modules/ApplicationManager/application_manager_test.cpp (+155/-0) tests/modules/DesktopFileReader/CMakeLists.txt (+0/-6) tests/modules/SessionManager/CMakeLists.txt (+6/-4) tests/modules/SessionManager/session_manager_test.cpp (+5/-5) tests/modules/SessionManager/session_test.cpp (+5/-5) tests/modules/SharedWakelock/CMakeLists.txt (+0/-1) tests/modules/SurfaceManager/CMakeLists.txt (+4/-4) tests/modules/SurfaceManager/mirsurfaceitem_test.cpp (+1/-1) tests/modules/TaskController/CMakeLists.txt (+6/-2) |
||||
| To merge this branch: | bzr merge lp:~dandrader/qtmir/surfaceItemFillMode | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | 2015-10-16 | Needs Fixing on 2015-11-30 |
| Michael Zanetti (community) | functional testing | 2015-10-16 | Approve on 2015-10-27 |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2015-10-14.
This proposal has been superseded by a proposal from 2015-12-04.
Commit Message
Add MirSurfaceItem.
Ensure that by the time we enter the phase of updating the scene graph, all qml items are up to date regarding the size of the buffer about to be rendered.
NB: This rendering scheme needs triple buffering to work.
Description of the Change
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Not applicable
| Daniel van Vugt (vanvugt) wrote : | # |
Glad to have helped. This isn't the first time someone has told me I'm wrong and then they went ahead and copied my code :)
| Gerry Boland (gerboland) wrote : | # |
What's the use-case of this fillMode? The crop ability might have use in the spread? But it's not a proper solution for the stretched frames issue on rotation.
| Daniel d'Andrada (dandrader) wrote : | # |
On 18/09/15 08:02, Gerry Boland wrote:
> What's the use-case of this fillMode? The crop ability might have use in the spread? But it's not a proper solution for the stretched frames issue on rotation.
Resize untiy8-dash in desktop mode on a Nexus device and you'll see.
| Michael Zanetti (mzanetti) wrote : | # |
Code looks ok, but as noticed on the related unity8 branch, I'm not sure if this is the proper place to calculate the innerRect stuff. It has the effect that it makes window content and window decoration/shadow go out of sync.
| Daniel d'Andrada (dandrader) wrote : | # |
On 23/09/2015 07:32, Michael Zanetti wrote:
> Review: Needs Information
>
> Code looks ok, but as noticed on the related unity8 branch, I'm not sure if this is the proper place to calculate the innerRect stuff. It has the effect that it makes window content and window decoration/shadow go out of sync.
They're two separate things. fillMode is there to ensure that you never
see a stretched surface even if the MirSurfaceItem size doesn't match
it. See it as yet another MirSurface feature that shells (unity8) can
take and use it on their UI/interaction designs.
What unity8 *does with it* is another thing. That shadow "going out of
sync" is a crude implementation or that unity7 window resize mode where
the window is not resize live, but you drag a translucent orang bounding
rect of it and only on release does the window get committed to that
bounding rect size (or actually a hint for the possibility doing the same).
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:389
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:391
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 387. By Albert Astals Cid on 2015-10-21
-
Don't search for the element again
Approved by: Gerry Boland, PS Jenkins bot
- 388. By Daniel d'Andrada on 2015-10-21
-
Shell draws its own cursor using the new Cursor QML element
Approved by: Lukáš Tinkl, Gerry Boland - 389. By Gerry Boland on 2015-10-21
-
Initial multimonitor support - react correctly to Mir DisplayConfigur
ation changes. On Mir DisplayConfigur
ation changes, QtMir now correctly:
1. blocks Mir until it has stopped all renderers and has their GL contexts released
2. reads the new DisplayConfiguration, matches any existing ScreenWindows to new DisplayBuffers should they change (as Mir may destroy and create it on us)
3. restarts all renderersThis also solves shutdown crash issues due to raciness of mir destroying the GL context backing the shell's QWindow before its renderer had stopped.
Add Unity.Screens qml module to advertise current screen state to QML. Fixes: #1436735, #1488831, #1488863
Approved by: Daniel d'Andrada - 390. By Michał Sawicz on 2015-10-21
-
MirSurfaceItem: Survive holding a surface with an empty texture
Survive having a surface whose texture holds no mir buffer at all.
Instead of crashing in such situation we simply don't render it.
Approved by: Gerry Boland - 391. By Michał Sawicz on 2015-10-21
-
Improve multimonitor support
* Removed magic:
- Don't automagically select the screen where a window will be show.
Let shell decide.
- Don't automagically focus a window. Let shell handle it.* Let shell know when a screen is about to be removed so that it has
the opportunity to move or destroy a window in it before it's too late.
- Added QGuiApplication::onScreenAbout ToBeRemoved * Added logging to key events
Approved by: Michał Sawicz - 392. By Alan Griffiths on 2015-10-21
-
Opaquify MirWindowManager to control visibility of upcoming Window Management work
Approved by: Gerry Boland, PS Jenkins bot - 393. By Lukáš Tinkl on 2015-10-21
-
React to surface modifications (window caption)
Approved by: Daniel d'Andrada - 394. By Nick Dedekind on 2015-10-21
-
Removed the manipulation of the CMAKE_INSTALL_
PREFIX from debian/rules
Approved by: Gerry Boland - 395. By Nick Dedekind on 2015-10-21
-
Added touch performance tracing and test.
Approved by: Gerry Boland - 396. By Lukáš Tinkl on 2015-10-21
-
Implement support for mouse wheel events; correctly pass around buttons Fixes: #1497091
Approved by: Gerry Boland - 397. By Gerry Boland on 2015-10-21
-
Workaround for AutoPilot input coordinate positioning being outside screen geometry
- 398. By CI Train Bot Account on 2015-10-21
-
Releasing 0.4.6+15.
10.20151021- 0ubuntu1
| Michael Zanetti (mzanetti) wrote : | # |
I've tested this and it works fine. Would prefer Gerry to have a look at the code as there is quite some buffer handling involved which I'm not too experienced with.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:392
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Gerry Boland (gerboland) wrote : | # |
Remind me why we want to support Stretch?
| Daniel d'Andrada (dandrader) wrote : | # |
> Remind me why we want to support Stretch?
Stretch does sound like a bad name, but scaling is stretching while respecting the aspect ratio of the surface.
And we want scaling working to display window thumbnails in the alt-tab spread, for instance.
- 399. By Michał Sawicz on 2015-11-02
-
Clean up packaging and fix autopkgtest on armhf
Approved by: Gerry Boland - 400. By Michael Terry on 2015-11-02
-
Support new isTouchApp property to ApplicationInfo
Interface and move lifecycle policy logic out of qtmir. Now that qtmir won't decide policy for suspending anymore, we don't need all the lifecycleException handling in qtmir either. That can move to unity8.
But since the GSettings key for that was registered under the qtmir namespace (and there's no technical reason to migrate settings), I left the schema and classes dealing with GSettings alone, for future use.
- 401. By Nick Dedekind on 2015-11-02
-
Support server->client visibility change to stop rendering (lp:#1475678) Fixes: #1475678
Approved by: Daniel d'Andrada - 402. By Alan Griffiths on 2015-11-02
-
Test harness for MirWindowManager (in preparation for more intelligent window management)
Approved by: Gerry Boland - 403. By Nick Dedekind on 2015-11-02
-
Hand Qt millisecond timestamps rather than nanosecond. Fixes: #1510571, #1511076, #1511711
Approved by: Gerry Boland - 404. By CI Train Bot Account on 2015-11-02
-
Releasing 0.4.6+16.
04.20151102- 0ubuntu1 - 405. By Nick Dedekind on 2015-11-10
-
Reverted occlusion detection (lp#1514556) Fixes: #1514556
- 406. By CI Train Bot Account on 2015-11-10
-
Releasing 0.4.6+16.
04.20151110- 0ubuntu1 - 407. By Gerry Boland on 2015-11-12
-
Fix armhf builds on Xenial by using -std=gnu99 instead of c99
Fixes this FTBFS on xenial:
In file included from /usr/include/
lttng/tracepoin t-rcu.h: 26:0,
from /usr/include/ lttng/tracepoin t.h:29,
from /home/phablet/ dev/projects/ qtmir/qtmir/ BUILD-xen/ src/platforms/ mirserver/ tracepoints. h:10,
from /home/phablet/ dev/projects/ qtmir/qtmir/ BUILD-xen/ src/platforms/ mirserver/ tracepoints. c:7:
/usr/include/urcu/arch/ generic. h: In function ‘caa_get_cycles’:
/usr/include/urcu/arch/ generic. h:165:6: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
if (caa_unlikely(clock_gettime( CLOCK_MONOTONIC , &ts)))
^
/usr/include/urcu/arch/ generic. h:165:6: note: each undeclared identifier is reported only once for each function it appears in Strictly should compile code with -std=gnu99 instead of -std=c99 to have the identifiers SIGEV_SIGNAL, sigeventStruct, and CLOCK_MONOTONIC available. These identifiers are declared when _POSIX_C_SOURCE is set to a value >= 199309L, which is the case with -std=gnu99. I could also have used -D_POSIX_
C_SOURCE= 199309L -std=c99 or have the macro defined in source code. Did not impact wily as libuctu only started looking for CLOCK_MONOTONIC in Xenial release.
Approved by: Daniel d'Andrada - 408. By CI Train Bot Account on 2015-11-12
-
Releasing 0.4.6+16.
04.20151112- 0ubuntu1 - 409. By Nick Dedekind on 2015-11-13
-
Update surface textures when dropping frames. Fixes: #1515356
Approved by: Gerry Boland - 410. By CI Train Bot Account on 2015-11-13
-
Releasing 0.4.6+16.
04.20151113- 0ubuntu1 - 411. By Gerry Boland on 2015-11-19
-
Fix use of uninitialized variable
Approved by: Daniel d'Andrada, PS Jenkins bot - 412. By Albert Astals Cid on 2015-11-19
-
Enable Efficient String Construction by default
See http://
blog.qt. io/blog/ 2011/06/ 13/string- concatenation- with-qstringbui lder/
Approved by: Gerry Boland, PS Jenkins bot - 413. By Michał Sawicz on 2015-11-19
-
Build with clang (tests/gmock fails and is unfixable on our side i'd say)
Approved by: Gerry Boland - 414. By Gerry Boland on 2015-11-19
-
Use pid_t for PIDs.
Approved by: Daniel d'Andrada, PS Jenkins bot - 415. By Loïc Molinari on 2015-11-19
-
Ensured Mir surface items with size less than or equal to zero are not rendered, as it's usually done for standard QtQuick items.
Approved by: Gerry Boland - 416. By Nick Dedekind on 2015-11-19
-
Fix a crash when dropping a surface frame before Qt draws a surface item. Fixes: #1517139
Approved by: Gerry Boland - 417. By CI Train Bot Account on 2015-11-19
-
Releasing 0.4.6+16.
04.20151119- 0ubuntu1 - 418. By Daniel d'Andrada on 2015-11-25
-
Implemented support for cursors set by client surfaces
Approved by: Lukáš Tinkl - 419. By Gerry Boland on 2015-11-25
-
Manage frameSwapped signal/slot connection with MirSurface more strictly to avoid crash.
Direct Signal/slot connections across thread boundaries incur the same risks as any cross-thread calls. While connect/disconnect are thread safe methods, it is possible for a slot to be called while the slot owner is being deconstructed - and so not yet disconnected.
So watch for the Item's window change signal and disconnect signal immediately. Also move slot ownership to MirSurfaceItem to auto-disconnect more aggressively.
Fixes: #1517571
Approved by: Daniel d'Andrada - 420. By Daniel d'Andrada on 2015-11-25
-
Forward Mir mouse wheel events to the shell cursor Fixes: #1497091
Approved by: Lukáš Tinkl - 421. By Daniel d'Andrada on 2015-11-25
-
Revert revision 415
The commit "Ensured Mir surface items with size less than or equal to zero are not rendered,
as it's usually done for standard QtQuick items." caused a regression.MirSurface.size was being kept uninitialized, as QSize(-1,-1).
- 422. By CI Train Bot Account on 2015-11-25
-
Releasing 0.4.6+16.
04.20151125- 0ubuntu1
| Loïc Molinari (loic.molinari) wrote : | # |
Using polish() sounds like the right thing to do in order to correctly sync surface size and item size, no more temporary frame drawn with surface size different than item size. Emitting the item sizeChanged signal in the GUI thread right before the updatePaintNode() callback in the render thread doesn't imply 2 frames anymore when Unity requires a surface resize. It should also fix that [1].
Regarding the fill mode, I think we should expose the same enum names that the standard QtQuick Image uses with, for now, just the needed ones : Stretch and Pad. That would make things cleaner IMO, easier to understand for people used to that and would allow to add the PreserveAspectFit and PreserveAspectCrop (and maybe the alignment props) later if ever needed.
(Take my comments with a grain of salt because I'm not completely aware of the whole picture, but I'm taking the liberty of commenting on that because I've been working a bit on qtmir lately for the mutlibuffer stream thing and for the AA optimization which kinda touches the same code path ;) )
[1] https:/
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:418
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:420
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:423
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 423. By Timo Jyrinki on 2015-12-01
-
Rebuild against Qt 5.5.1.
- 424. By Daniel d'Andrada on 2015-12-04
- 425. By Daniel d'Andrada on 2015-12-04
-
Add MirSurfaceItem.
fillMode - 426. By Daniel d'Andrada on 2015-12-04
-
Fix bad merge of polite-close
Unmerged revisions
- 426. By Daniel d'Andrada on 2015-12-04
-
Fix bad merge of polite-close
- 425. By Daniel d'Andrada on 2015-12-04
-
Add MirSurfaceItem.
fillMode - 424. By Daniel d'Andrada on 2015-12-04

FAILED: Continuous integration, rev:370 jenkins. qa.ubuntu. com/job/ qtmir-ci/ 412/ jenkins. qa.ubuntu. com/job/ qtmir-wily- amd64-ci/ 145/console jenkins. qa.ubuntu. com/job/ qtmir-wily- armhf-ci/ 145/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/qtmir- ci/412/ rebuild
http://