Merge lp:~nick-dedekind/qtubuntu/occlusion-2.0 into lp:qtubuntu

Proposed by Nick Dedekind
Status: Superseded
Proposed branch: lp:~nick-dedekind/qtubuntu/occlusion-2.0
Merge into: lp:qtubuntu
Diff against target: 251 lines (+70/-31)
4 files modified
debian/control (+0/-1)
debian/gles-patches/convert-to-gles.patch (+36/-23)
debian/rules (+21/-7)
src/ubuntumirclient/window.cpp (+13/-0)
To merge this branch: bzr merge lp:~nick-dedekind/qtubuntu/occlusion-2.0
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Michael Terry Needs Information
PS Jenkins bot continuous-integration Approve
Review via email: mp+283194@code.launchpad.net

This proposal has been superseded by a proposal from 2016-06-14.

Commit message

Re-added window exposure for occlusion detection

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~nick-dedekind/qtmir/occlusion-2.0/+merge/283197

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:308
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-1-ci/4/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-1-ci/4/rebuild

review: Approve (continuous-integration)
307. By Olivier Tilloy

Instantiate QKeyEvents with the scan code, native modifiers and native virtual key code, and special-case XKB_KEY_Return and XKB_KEY_KP_Enter to emit a carriage return character. Fixes: #1433138
Approved by: Lukáš Tinkl, PS Jenkins bot

308. By Daniel d'Andrada

Use logging categories and fix coding style (tab length)

So logging can be enabled/disabled at runtime instead of at build time
Approved by: Gerry Boland, PS Jenkins bot

309. By Daniel d'Andrada

Implement QPlatformOffscreenSurface

Otherwise Qt might create a full QPlatformWindow during shutdown (which will cause the creation of a mir surface) while cleaning up the GL context and we don't want that. Fixes: #1527737
Approved by: Gerry Boland, PS Jenkins bot

310. By CI Train Bot Account

Releasing 0.62+16.04.20160128.1-0ubuntu1

Revision history for this message
Michael Terry (mterry) wrote :

What's with the mNeedsExposeCatchup usage? If the window starts occluded, we do a one-time handleExposeEvent call? I'm sure it makes sense, I just don't understand the sequencing.

Revision history for this message
Michael Terry (mterry) wrote :

This has a merge conflict in src/ubuntumirclient/window.cpp it seems (though LP isn't showing it).

Revision history for this message
Michael Terry (mterry) wrote :

I tested this on the phone with the Music app:

QSG_RENDER_TIMING=1 QT_LOGGING_RULES="ubuntumirclient=true" qmlscene -qt5 /usr/share/click/preinstalled/com.ubuntu.music/current/app/music-app.qml --desktop_file_hint=/usr/share/click/preinstalled/com.ubuntu.music/current/com.ubuntu.music_music.desktop

Worked great! I want to try to do some testing with the Desktop stage, but I haven't noticed a regression like bug 1514556 yet.

Revision history for this message
Michael Terry (mterry) wrote :

Desktop mode seems to work fine.

But I get unity8 crashes if I flip between windowed and staged mode on my phone. They don't seem to be there without these branches.

gsettings set com.canonical.Unity8 usage-mode Staged
vs
gsettings set com.canonical.Unity8 usage-mode Windowed

I'm not sure what the exact trigger is. I had Music app playing music in the background, trying to render when it can. And some other windows, one was maximized. And I would just move them around, reorder them, and switch usage-modes. Got a crash a couple times that way.

Do you see that?

review: Needs Information
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Desktop mode seems to work fine.
>
> But I get unity8 crashes if I flip between windowed and staged mode on my
> phone. They don't seem to be there without these branches.
>
> gsettings set com.canonical.Unity8 usage-mode Staged
> vs
> gsettings set com.canonical.Unity8 usage-mode Windowed
>
> I'm not sure what the exact trigger is. I had Music app playing music in the
> background, trying to render when it can. And some other windows, one was
> maximized. And I would just move them around, reorder them, and switch usage-
> modes. Got a crash a couple times that way.
>
> Do you see that?

hm. supprised u8 crashes since this is mostly a qtubuntu change. I'll take a look.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> > Desktop mode seems to work fine.
> >
> > But I get unity8 crashes if I flip between windowed and staged mode on my
> > phone. They don't seem to be there without these branches.
> >
> > gsettings set com.canonical.Unity8 usage-mode Staged
> > vs
> > gsettings set com.canonical.Unity8 usage-mode Windowed
> >
> > I'm not sure what the exact trigger is. I had Music app playing music in
> the
> > background, trying to render when it can. And some other windows, one was
> > maximized. And I would just move them around, reorder them, and switch
> usage-
> > modes. Got a crash a couple times that way.
> >
> > Do you see that?
>
> hm. supprised u8 crashes since this is mostly a qtubuntu change. I'll take a
> look.

Can't seem to reproduce a crash. Could you please get me a stacktrace?

Revision history for this message
Michael Terry (mterry) wrote :

I had mentioned getting crashes earlier on IRC. But I had been using a poorly built version. Tried again with new build, but still get crashes.

I was toggling between Windowed and Staged modes and got lots of crashes in apps. Here are some stacktraces with just qtmir/qtubuntu symbols:
They all look roughly like (this one was from gallery-app) http://paste.ubuntu.com/15096134/

Revision history for this message
Michael Terry (mterry) wrote :

And here's one with some more symbols: http://paste.ubuntu.com/15096395/

311. By Nick Dedekind

Added support for low shell chrome Fixes: #1535397
Approved by: Gerry Boland, Unity8 CI Bot

312. By Lukáš Tinkl

Support for switching kbd layouts Fixes: #1491340, #1524400
Approved by: Unity8 CI Bot, Michael Terry, PS Jenkins bot

313. By CI Train Bot Account

Releasing 0.62+16.04.20160322-0ubuntu1

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
314. By Daniel d'Andrada

Proper support for multiple screens and dynamic scaling support Fixes: #1534682, #1573532
Approved by: Nick Dedekind, Unity8 CI Bot, Daniel d'Andrada, Gerry Boland

315. By Robert Bruce Park

Inline GLES packaging using a quilt patch.
Approved by: Unity8 CI Bot

316. By CI Train Bot Account

Releasing 0.62+16.04.20160428-0ubuntu1

317. By Albert Astals Cid

Enable workaround_brokenFBOReadBack on the Mali 400

Gives for impressive improvements in QSGDefaultDistanceFieldGlyphCache::storeGlyphs
impressive = 788ms -> 6ms
Approved by: Gerry Boland, Unity8 CI Bot

318. By Albert Astals Cid

Enable workaround_brokenFBOReadBack on the PowerVR Rogue G6200
Approved by: Gerry Boland, Unity8 CI Bot

319. By Albert Astals Cid

Enable workaround_brokenFBOReadBack on the Mali-T760
Approved by: Gerry Boland, Unity8 CI Bot

320. By Michael Terry

Build qtubuntu for arm64, and drop ancient qthybris transition package.

321. By CI Train Bot Account

Releasing 0.62+16.10.20160527.1-0ubuntu1

322. By Nick Dedekind

crossbuild support

323. By Nick Dedekind

added expose catchup

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-05-27 12:19:48 +0000
+++ debian/control 2016-06-14 10:49:38 +0000
@@ -15,7 +15,6 @@
15 libudev-dev,15 libudev-dev,
16 libxkbcommon-dev,16 libxkbcommon-dev,
17 libxrender-dev,17 libxrender-dev,
18 qt5-default,
19 qtbase5-private-dev,18 qtbase5-private-dev,
20 quilt,19 quilt,
21# if you don't have have commit access to this branch but would like to upload20# if you don't have have commit access to this branch but would like to upload
2221
=== modified file 'debian/gles-patches/convert-to-gles.patch'
--- debian/gles-patches/convert-to-gles.patch 2016-05-27 13:03:49 +0000
+++ debian/gles-patches/convert-to-gles.patch 2016-06-14 10:49:38 +0000
@@ -1,14 +1,14 @@
1Index: arm64/debian/control1Index: cross-build-support/debian/control
2===================================================================2===================================================================
3--- arm64.orig/debian/control3--- cross-build-support.orig/debian/control
4+++ arm64/debian/control4+++ cross-build-support/debian/control
5@@ -1,4 +1,4 @@5@@ -1,4 +1,4 @@
6-Source: qtubuntu6-Source: qtubuntu
7+Source: qtubuntu-gles7+Source: qtubuntu-gles
8 Priority: optional8 Priority: optional
9 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>9 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
10 Build-Depends: debhelper (>= 9),10 Build-Depends: debhelper (>= 9),
11@@ -11,12 +11,20 @@ Build-Depends: debhelper (>= 9),11@@ -11,11 +11,20 @@ Build-Depends: debhelper (>= 9),
12 libinput-dev,12 libinput-dev,
13 libmirclient-dev (>= 0.13.0),13 libmirclient-dev (>= 0.13.0),
14 libmtdev-dev,14 libmtdev-dev,
@@ -22,15 +22,14 @@
22 libudev-dev,22 libudev-dev,
23 libxkbcommon-dev,23 libxkbcommon-dev,
24 libxrender-dev,24 libxrender-dev,
25 qt5-default,25 qtbase5-private-dev,
26- qtbase5-private-dev,
27+ qtbase5-gles-dev,26+ qtbase5-gles-dev,
28+ qtbase5-private-gles-dev,27+ qtbase5-private-gles-dev,
29+ qtdeclarative5-dev,28+ qtdeclarative5-dev,
30 quilt,29 quilt,
31 # if you don't have have commit access to this branch but would like to upload30 # if you don't have have commit access to this branch but would like to upload
32 # directly to Ubuntu, don't worry: your changes will be merged back into the31 # directly to Ubuntu, don't worry: your changes will be merged back into the
33@@ -26,7 +34,7 @@ Standards-Version: 3.9.632@@ -25,7 +34,7 @@ Standards-Version: 3.9.6
34 Section: libs33 Section: libs
35 34
36 Package: qtubuntu-android35 Package: qtubuntu-android
@@ -39,7 +38,7 @@
39 Multi-Arch: same38 Multi-Arch: same
40 Conflicts: qtubuntu-desktop,39 Conflicts: qtubuntu-desktop,
41 Replaces: qtubuntu (<< 0.52),40 Replaces: qtubuntu (<< 0.52),
42@@ -37,31 +45,12 @@ Provides: qtubuntu,41@@ -36,31 +45,12 @@ Provides: qtubuntu,
43 Depends: ubuntu-application-api3-touch,42 Depends: ubuntu-application-api3-touch,
44 ${misc:Depends},43 ${misc:Depends},
45 ${shlibs:Depends},44 ${shlibs:Depends},
@@ -74,37 +73,53 @@
74- This variant of the package is for GNU-based desktops.73- This variant of the package is for GNU-based desktops.
75+ This variant of the package is for Android-based phones and tablets (built74+ This variant of the package is for Android-based phones and tablets (built
76+ against the OpenGLES variant of qtbase).75+ against the OpenGLES variant of qtbase).
77Index: arm64/debian/rules76Index: cross-build-support/debian/rules
78===================================================================77===================================================================
79--- arm64.orig/debian/rules78--- cross-build-support.orig/debian/rules
80+++ arm64/debian/rules79+++ cross-build-support/debian/rules
81@@ -4,47 +4,25 @@80@@ -5,60 +5,35 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL=4
82 export DPKG_GENSYMBOLS_CHECK_LEVEL=481 export QT_SELECT=5
83 82
84 ANDROID_DIR = build-android83 ANDROID_DIR = build-android
85-DESKTOP_DIR = build-desktop84-DESKTOP_DIR = build-desktop
86 TMP1_DIR = $(CURDIR)/debian/tmp185 TMP1_DIR = $(CURDIR)/debian/tmp1
87-TMP2_DIR = $(CURDIR)/debian/tmp286-TMP2_DIR = $(CURDIR)/debian/tmp2
88-87
89-# We only want to build qtubuntu-android on arches using Qt built with OpenGL ES2.088-# We only want to build qtubuntu-android on arches using Qt built with OpenGL ES2.0
90-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)89 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
90 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
91 DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
92
93 export PKG_CONFIG_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
94
91-gles2_architectures = arm64 armhf95-gles2_architectures = arm64 armhf
92 96-
93 %:97 %:
94 dh $@98 dh $@
95 99
96 override_dh_clean:100 override_dh_clean:
97-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))101-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
98 rm -rf $(TMP1_DIR)102- rm -rf $(TMP1_DIR) $(DESKTOP_DIR)
99-endif103-endif
100- rm -rf $(TMP2_DIR)104- rm -rf $(TMP2_DIR) $(ANDROID_DIR)
105+ rm -rf $(TMP1_DIR) $(ANDROID_DIR)
101 dh_clean106 dh_clean
102 107
103 override_dh_auto_configure:108 override_dh_auto_configure:
104-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))109-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
105 mkdir -p $(ANDROID_DIR) && dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)110 mkdir -p $(ANDROID_DIR)
106-endif111 ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
107- mkdir -p $(DESKTOP_DIR) && dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)112 cd $(ANDROID_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
113 else
114 dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
115 endif
116-endif
117- mkdir -p $(DESKTOP_DIR)
118-ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
119- cd $(DESKTOP_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
120-else
121- dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
122-endif
108 123
109 override_dh_auto_build:124 override_dh_auto_build:
110-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))125-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
@@ -116,10 +131,8 @@
116 rm -f debian/*/usr/lib/*/qt5/examples/qtubuntu/qmlscene-ubuntu131 rm -f debian/*/usr/lib/*/qt5/examples/qtubuntu/qmlscene-ubuntu
117-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))132-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
118 mkdir -p $(TMP1_DIR) && cd $(ANDROID_DIR) && INSTALL_ROOT=$(TMP1_DIR) make install133 mkdir -p $(TMP1_DIR) && cd $(ANDROID_DIR) && INSTALL_ROOT=$(TMP1_DIR) make install
119 cd $(CURDIR)
120-endif134-endif
121- mkdir -p $(TMP2_DIR) && cd $(DESKTOP_DIR) && INSTALL_ROOT=$(TMP2_DIR) make install135- mkdir -p $(TMP2_DIR) && cd $(DESKTOP_DIR) && INSTALL_ROOT=$(TMP2_DIR) make install
122- cd $(CURDIR)
123 136
124 override_dh_install:137 override_dh_install:
125-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))138-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
126139
=== modified file 'debian/rules'
--- debian/rules 2016-05-27 13:01:34 +0000
+++ debian/rules 2016-06-14 10:49:38 +0000
@@ -2,6 +2,7 @@
2# -*- makefile -*-2# -*- makefile -*-
33
4export DPKG_GENSYMBOLS_CHECK_LEVEL=44export DPKG_GENSYMBOLS_CHECK_LEVEL=4
5export QT_SELECT=5
56
6ANDROID_DIR = build-android7ANDROID_DIR = build-android
7DESKTOP_DIR = build-desktop8DESKTOP_DIR = build-desktop
@@ -10,6 +11,11 @@
1011
11# We only want to build qtubuntu-android on arches using Qt built with OpenGL ES2.012# We only want to build qtubuntu-android on arches using Qt built with OpenGL ES2.0
12DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)13DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
14DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
15DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
16
17export PKG_CONFIG_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
18
13gles2_architectures = arm64 armhf19gles2_architectures = arm64 armhf
1420
15%:21%:
@@ -17,16 +23,26 @@
1723
18override_dh_clean:24override_dh_clean:
19ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))25ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
20 rm -rf $(TMP1_DIR)26 rm -rf $(TMP1_DIR) $(DESKTOP_DIR)
21endif27endif
22 rm -rf $(TMP2_DIR)28 rm -rf $(TMP2_DIR) $(ANDROID_DIR)
23 dh_clean29 dh_clean
2430
25override_dh_auto_configure:31override_dh_auto_configure:
26ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))32ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
27 mkdir -p $(ANDROID_DIR) && dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)33 mkdir -p $(ANDROID_DIR)
28endif34 ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
29 mkdir -p $(DESKTOP_DIR) && dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)35 cd $(ANDROID_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
36 else
37 dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
38 endif
39endif
40 mkdir -p $(DESKTOP_DIR)
41ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
42 cd $(DESKTOP_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
43else
44 dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
45endif
3046
31override_dh_auto_build:47override_dh_auto_build:
32ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))48ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
@@ -38,10 +54,8 @@
38 rm -f debian/*/usr/lib/*/qt5/examples/qtubuntu/qmlscene-ubuntu54 rm -f debian/*/usr/lib/*/qt5/examples/qtubuntu/qmlscene-ubuntu
39ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))55ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
40 mkdir -p $(TMP1_DIR) && cd $(ANDROID_DIR) && INSTALL_ROOT=$(TMP1_DIR) make install56 mkdir -p $(TMP1_DIR) && cd $(ANDROID_DIR) && INSTALL_ROOT=$(TMP1_DIR) make install
41 cd $(CURDIR)
42endif57endif
43 mkdir -p $(TMP2_DIR) && cd $(DESKTOP_DIR) && INSTALL_ROOT=$(TMP2_DIR) make install58 mkdir -p $(TMP2_DIR) && cd $(DESKTOP_DIR) && INSTALL_ROOT=$(TMP2_DIR) make install
44 cd $(CURDIR)
4559
46override_dh_install:60override_dh_install:
47ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))61ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
4862
=== modified file 'src/ubuntumirclient/window.cpp'
--- src/ubuntumirclient/window.cpp 2016-04-28 14:44:18 +0000
+++ src/ubuntumirclient/window.cpp 2016-06-14 10:49:38 +0000
@@ -280,6 +280,8 @@
280 mMirSurface = createMirSurface(mWindow, mirOutputId, input, connection, surfaceEventCallback, this);280 mMirSurface = createMirSurface(mWindow, mirOutputId, input, connection, surfaceEventCallback, this);
281 mEglSurface = eglCreateWindowSurface(mEglDisplay, config, nativeWindowFor(mMirSurface), nullptr);281 mEglSurface = eglCreateWindowSurface(mEglDisplay, config, nativeWindowFor(mMirSurface), nullptr);
282282
283 mNeedsExposeCatchup = mir_surface_get_visibility(mMirSurface) == mir_surface_visibility_occluded;
284
283 // Window manager can give us a final size different from what we asked for285 // Window manager can give us a final size different from what we asked for
284 // so let's check what we ended up getting286 // so let's check what we ended up getting
285 MirSurfaceParameters parameters;287 MirSurfaceParameters parameters;
@@ -335,6 +337,8 @@
335 void setSurfaceParent(MirSurface*);337 void setSurfaceParent(MirSurface*);
336 bool hasParent() const { return mParented; }338 bool hasParent() const { return mParented; }
337339
340 bool mNeedsExposeCatchup;
341
338private:342private:
339 static void surfaceEventCallback(MirSurface* surface, const MirEvent *event, void* context);343 static void surfaceEventCallback(MirSurface* surface, const MirEvent *event, void* context);
340 void postEvent(const MirEvent *event);344 void postEvent(const MirEvent *event);
@@ -562,6 +566,7 @@
562 QMutexLocker lock(&mMutex);566 QMutexLocker lock(&mMutex);
563 qCDebug(ubuntumirclient, "handleSurfaceExposeChange(window=%p, exposed=%s)", window(), exposed ? "true" : "false");567 qCDebug(ubuntumirclient, "handleSurfaceExposeChange(window=%p, exposed=%s)", window(), exposed ? "true" : "false");
564568
569 mSurface->mNeedsExposeCatchup = false;
565 if (mWindowExposed == exposed) return;570 if (mWindowExposed == exposed) return;
566 mWindowExposed = exposed;571 mWindowExposed = exposed;
567572
@@ -728,6 +733,14 @@
728{733{
729 QMutexLocker lock(&mMutex);734 QMutexLocker lock(&mMutex);
730 mSurface->onSwapBuffersDone();735 mSurface->onSwapBuffersDone();
736
737 if (mSurface->mNeedsExposeCatchup) {
738 mSurface->mNeedsExposeCatchup = false;
739 mWindowExposed = false;
740
741 lock.unlock();
742 QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
743 }
731}744}
732745
733void UbuntuWindow::handleScreenPropertiesChange(MirFormFactor formFactor, float scale)746void UbuntuWindow::handleScreenPropertiesChange(MirFormFactor formFactor, float scale)

Subscribers

People subscribed via source and target branches