Merge lp:~aacid/qtmir/glyph_workaround_speedup into lp:qtmir

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 487
Merged at revision: 500
Proposed branch: lp:~aacid/qtmir/glyph_workaround_speedup
Merge into: lp:qtmir
Diff against target: 45 lines (+22/-0)
1 file modified
src/platforms/mirserver/miropenglcontext.cpp (+22/-0)
To merge this branch: bzr merge lp:~aacid/qtmir/glyph_workaround_speedup
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Unity8 CI Bot (community) continuous-integration Approve
Review via email: mp+294915@code.launchpad.net

Commit message

Enable workaround_brokenFBOReadBack on various chipsets

Gives for impressive improvements in QSGDefaultDistanceFieldGlyphCache::storeGlyphs
impressive = 788ms -> 6ms

Copied from qtubuntu

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * 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?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:487
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/219/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1644
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1597
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1597
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1590
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1590/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1590
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1590/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1590
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1590/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1590
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1590/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1590
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1590/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1590
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1590/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/219/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

LGTM

review: Approve
488. By Albert Astals Cid

Make it detect the M10 GPU too (a 720)

Since it also gives 100ms -> 5ms improvements

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/platforms/mirserver/miropenglcontext.cpp'
--- src/platforms/mirserver/miropenglcontext.cpp 2016-05-06 08:31:13 +0000
+++ src/platforms/mirserver/miropenglcontext.cpp 2016-05-25 13:52:29 +0000
@@ -25,6 +25,7 @@
25#include <QOpenGLFramebufferObject>25#include <QOpenGLFramebufferObject>
26#include <QSurfaceFormat>26#include <QSurfaceFormat>
27#include <QtPlatformSupport/private/qeglconvenience_p.h>27#include <QtPlatformSupport/private/qeglconvenience_p.h>
28#include <QtGui/private/qopenglcontext_p.h>
2829
29// Mir30// Mir
30#include <mir/graphics/display.h>31#include <mir/graphics/display.h>
@@ -118,6 +119,23 @@
118 }119 }
119}120}
120121
122static bool needsFBOReadBackWorkaround()
123{
124 static bool set = false;
125 static bool needsWorkaround = false;
126
127 if (!set) {
128 const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
129 // Keep in sync with qtubuntu
130 needsWorkaround = qstrncmp(rendererString, "Mali-400", 8) == 0
131 || qstrncmp(rendererString, "Mali-T7", 7) == 0
132 || qstrncmp(rendererString, "PowerVR Rogue G6200", 19) == 0;
133 set = true;
134 }
135
136 return needsWorkaround;
137}
138
121bool MirOpenGLContext::makeCurrent(QPlatformSurface *surface)139bool MirOpenGLContext::makeCurrent(QPlatformSurface *surface)
122{140{
123 if (surface->surface()->surfaceClass() == QSurface::Offscreen) {141 if (surface->surface()->surfaceClass() == QSurface::Offscreen) {
@@ -142,6 +160,10 @@
142 }160 }
143#endif161#endif
144162
163 QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
164 if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
165 ctx_d->workaround_brokenFBOReadBack = true;
166
145 return true;167 return true;
146 }168 }
147169

Subscribers

People subscribed via source and target branches