Merge lp:~albaguirre/qtmir/ignore-first-frame into lp:qtmir

Proposed by Alberto Aguirre
Status: Rejected
Rejected by: Alberto Aguirre
Proposed branch: lp:~albaguirre/qtmir/ignore-first-frame
Merge into: lp:qtmir
Diff against target: 38 lines (+9/-1)
2 files modified
src/modules/Unity/Application/mirsurfaceitem.cpp (+8/-1)
src/modules/Unity/Application/mirsurfaceitem.h (+1/-0)
To merge this branch: bzr merge lp:~albaguirre/qtmir/ignore-first-frame
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mir development team Pending
Review via email: mp+231612@code.launchpad.net

Commit message

Ignore application first posted frame

Ignore the first posted frame as it will be blank. Since the surface
is alpha enabled it's alpha channel is initialized to 0 (completely
transparent). If the frame is posted it will show through a flash
of the surface beneath (usually dash).

Description of the change

Ignore application first posted frame

Ignore the first posted frame as it will be blank. Since the surface
is alpha enabled it's alpha channel is initialized to 0 (completely
transparent). If the frame is posted it will show through a flash
of the surface beneath (usually dash).

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
Alberto Aguirre (albaguirre) wrote :

The root cause is actually a bug in mir: https://bugs.launchpad.net/mir/+bug/1359406

Unmerged revisions

237. By Alberto Aguirre

Ignore application first posted frame

Ignore the first posted frame as it will be blank. Since the surface
is alpha enabled it's alpha channel is initialized to 0 (completely
transparent). If the frame is posted it will show through a flash
of the surface beneath (usually dash).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp'
--- src/modules/Unity/Application/mirsurfaceitem.cpp 2014-08-12 18:23:06 +0000
+++ src/modules/Unity/Application/mirsurfaceitem.cpp 2014-08-20 19:05:50 +0000
@@ -216,7 +216,7 @@
216};216};
217217
218MirSurfaceObserver::MirSurfaceObserver()218MirSurfaceObserver::MirSurfaceObserver()
219 : m_listener(nullptr) {219 : m_listener(nullptr), first_frame_posted(false) {
220}220}
221221
222void MirSurfaceObserver::setListener(QObject *listener) {222void MirSurfaceObserver::setListener(QObject *listener) {
@@ -225,6 +225,13 @@
225225
226void MirSurfaceObserver::frame_posted(int frames_available) {226void MirSurfaceObserver::frame_posted(int frames_available) {
227 Q_UNUSED(frames_available);227 Q_UNUSED(frames_available);
228
229 //Ignore the first frame, it's blank for some reason.
230 if (!first_frame_posted)
231 {
232 first_frame_posted = true;
233 return;
234 }
228 QMetaObject::invokeMethod(m_listener, "surfaceDamaged");235 QMetaObject::invokeMethod(m_listener, "surfaceDamaged");
229}236}
230237
231238
=== modified file 'src/modules/Unity/Application/mirsurfaceitem.h'
--- src/modules/Unity/Application/mirsurfaceitem.h 2014-07-23 11:57:49 +0000
+++ src/modules/Unity/Application/mirsurfaceitem.h 2014-08-20 19:05:50 +0000
@@ -62,6 +62,7 @@
62 void orientation_set_to(MirOrientation) override {}62 void orientation_set_to(MirOrientation) override {}
63private:63private:
64 QObject *m_listener;64 QObject *m_listener;
65 bool first_frame_posted;
65};66};
6667
67class MirSurfaceItem : public QQuickItem68class MirSurfaceItem : public QQuickItem

Subscribers

People subscribed via source and target branches