Merge lp:~gerboland/qtubuntu/rasterGLSurface into lp:qtubuntu
- rasterGLSurface
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~gerboland/qtubuntu/rasterGLSurface |
Merge into: | lp:qtubuntu |
Diff against target: |
396 lines (+103/-131) 9 files modified
src/ubuntumirclient/backingstore.cpp (+7/-3) src/ubuntumirclient/backingstore.h (+1/-0) src/ubuntumirclient/desktopwindow.cpp (+26/-0) src/ubuntumirclient/desktopwindow.h (+29/-0) src/ubuntumirclient/glcontext.cpp (+19/-26) src/ubuntumirclient/integration.cpp (+19/-12) src/ubuntumirclient/offscreensurface.cpp (+0/-47) src/ubuntumirclient/offscreensurface.h (+0/-41) src/ubuntumirclient/ubuntumirclient.pro (+2/-2) |
To merge this branch: | bzr merge lp:~gerboland/qtubuntu/rasterGLSurface |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel d'Andrada (community) | Needs Information | ||
Unity8 CI Bot | continuous-integration | Approve | |
Review via email:
|
This proposal has been superseded by a proposal from 2016-09-28.
Commit message
Fix rendering of apps using QQuickWidget
Based on a branch by Daniel d'Andrada
- Advertise RasterGLSurface capability
- Implement proper offscreen rendering support using EGL pixel buffers.
- Don't create mir surfaces for Qt::Desktop QWindows. Proper implementation still pending
- Add BackingStore toImage method, fixes render of QQuick and Widget content
Description of the change
Tested working correctly on Desktop (Mesa), Nexus 4 & 7, Meizu MX4, Bq Aquaris 4.5.
M10 has rendering problems, still unresolved.
Good test is the "quickwidget" demo in qtdeclarative5-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:337
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel d'Andrada (dandrader) wrote : | # |
Shouldn't it supersede https:/
- 295. By Gerry Boland
-
Merge trunk
- 296. By Gerry Boland
-
Fix rendering of apps using QQuickWidget
Based on a branch by Daniel d'Andrada
- Advertise RasterGLSurface capability
- Don't create mir surfaces for Qt::Desktop QWindows. Proper implementation still pending
- Add BackingStore toImage method, fixes render of QQuick and Widget content
Unmerged revisions
Preview Diff
1 | === modified file 'src/ubuntumirclient/backingstore.cpp' | |||
2 | --- src/ubuntumirclient/backingstore.cpp 2016-04-20 16:10:06 +0000 | |||
3 | +++ src/ubuntumirclient/backingstore.cpp 2016-09-28 10:56:31 +0000 | |||
4 | @@ -35,9 +35,7 @@ | |||
5 | 35 | window->setSurfaceType(QSurface::OpenGLSurface); | 35 | window->setSurfaceType(QSurface::OpenGLSurface); |
6 | 36 | } | 36 | } |
7 | 37 | 37 | ||
11 | 38 | UbuntuBackingStore::~UbuntuBackingStore() | 38 | UbuntuBackingStore::~UbuntuBackingStore() = default; |
9 | 39 | { | ||
10 | 40 | } | ||
12 | 41 | 39 | ||
13 | 42 | void UbuntuBackingStore::flush(QWindow* window, const QRegion& region, const QPoint& offset) | 40 | void UbuntuBackingStore::flush(QWindow* window, const QRegion& region, const QPoint& offset) |
14 | 43 | { | 41 | { |
15 | @@ -125,3 +123,9 @@ | |||
16 | 125 | { | 123 | { |
17 | 126 | return &mImage; | 124 | return &mImage; |
18 | 127 | } | 125 | } |
19 | 126 | |||
20 | 127 | QImage UbuntuBackingStore::toImage() const | ||
21 | 128 | { | ||
22 | 129 | // used by QPlatformBackingStore::composeAndFlush | ||
23 | 130 | return mImage; | ||
24 | 131 | } | ||
25 | 128 | 132 | ||
26 | === modified file 'src/ubuntumirclient/backingstore.h' | |||
27 | --- src/ubuntumirclient/backingstore.h 2014-11-11 14:34:12 +0000 | |||
28 | +++ src/ubuntumirclient/backingstore.h 2016-09-28 10:56:31 +0000 | |||
29 | @@ -34,6 +34,7 @@ | |||
30 | 34 | void flush(QWindow* window, const QRegion& region, const QPoint& offset) override; | 34 | void flush(QWindow* window, const QRegion& region, const QPoint& offset) override; |
31 | 35 | void resize(const QSize& size, const QRegion& staticContents) override; | 35 | void resize(const QSize& size, const QRegion& staticContents) override; |
32 | 36 | QPaintDevice* paintDevice() override; | 36 | QPaintDevice* paintDevice() override; |
33 | 37 | QImage toImage() const override; | ||
34 | 37 | 38 | ||
35 | 38 | protected: | 39 | protected: |
36 | 39 | void updateTexture(); | 40 | void updateTexture(); |
37 | 40 | 41 | ||
38 | === added file 'src/ubuntumirclient/desktopwindow.cpp' | |||
39 | --- src/ubuntumirclient/desktopwindow.cpp 1970-01-01 00:00:00 +0000 | |||
40 | +++ src/ubuntumirclient/desktopwindow.cpp 2016-09-28 10:56:31 +0000 | |||
41 | @@ -0,0 +1,26 @@ | |||
42 | 1 | /* | ||
43 | 2 | * Copyright (C) 2016 Canonical, Ltd. | ||
44 | 3 | * | ||
45 | 4 | * This program is free software: you can redistribute it and/or modify it under | ||
46 | 5 | * the terms of the GNU Lesser General Public License version 3, as published by | ||
47 | 6 | * the Free Software Foundation. | ||
48 | 7 | * | ||
49 | 8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
50 | 9 | * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, | ||
51 | 10 | * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
52 | 11 | * Lesser General Public License for more details. | ||
53 | 12 | * | ||
54 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
55 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
56 | 15 | */ | ||
57 | 16 | |||
58 | 17 | #include "desktopwindow.h" | ||
59 | 18 | |||
60 | 19 | // local | ||
61 | 20 | #include "logging.h" | ||
62 | 21 | |||
63 | 22 | UbuntuDesktopWindow::UbuntuDesktopWindow(QWindow *window) | ||
64 | 23 | : QPlatformWindow(window) | ||
65 | 24 | { | ||
66 | 25 | qCDebug(ubuntumirclient, "UbuntuDesktopWindow(window=%p)", window); | ||
67 | 26 | } | ||
68 | 0 | 27 | ||
69 | === added file 'src/ubuntumirclient/desktopwindow.h' | |||
70 | --- src/ubuntumirclient/desktopwindow.h 1970-01-01 00:00:00 +0000 | |||
71 | +++ src/ubuntumirclient/desktopwindow.h 2016-09-28 10:56:31 +0000 | |||
72 | @@ -0,0 +1,29 @@ | |||
73 | 1 | /* | ||
74 | 2 | * Copyright (C) 2016 Canonical, Ltd. | ||
75 | 3 | * | ||
76 | 4 | * This program is free software: you can redistribute it and/or modify it under | ||
77 | 5 | * the terms of the GNU Lesser General Public License version 3, as published by | ||
78 | 6 | * the Free Software Foundation. | ||
79 | 7 | * | ||
80 | 8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
81 | 9 | * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, | ||
82 | 10 | * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
83 | 11 | * Lesser General Public License for more details. | ||
84 | 12 | * | ||
85 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
86 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
87 | 15 | */ | ||
88 | 16 | |||
89 | 17 | #ifndef UBUNTU_DESKTOP_WINDOW_H | ||
90 | 18 | #define UBUNTU_DESKTOP_WINDOW_H | ||
91 | 19 | |||
92 | 20 | #include <qpa/qplatformwindow.h> | ||
93 | 21 | |||
94 | 22 | // TODO Implement it. For now it's just an empty, dummy class. | ||
95 | 23 | class UbuntuDesktopWindow : public QPlatformWindow | ||
96 | 24 | { | ||
97 | 25 | public: | ||
98 | 26 | UbuntuDesktopWindow(QWindow*); | ||
99 | 27 | }; | ||
100 | 28 | |||
101 | 29 | #endif // UBUNTU_DESKTOP_WINDOW_H | ||
102 | 0 | 30 | ||
103 | === modified file 'src/ubuntumirclient/glcontext.cpp' | |||
104 | --- src/ubuntumirclient/glcontext.cpp 2016-08-09 23:00:32 +0000 | |||
105 | +++ src/ubuntumirclient/glcontext.cpp 2016-09-28 10:56:31 +0000 | |||
106 | @@ -16,11 +16,11 @@ | |||
107 | 16 | 16 | ||
108 | 17 | #include "glcontext.h" | 17 | #include "glcontext.h" |
109 | 18 | #include "logging.h" | 18 | #include "logging.h" |
110 | 19 | #include "offscreensurface.h" | ||
111 | 20 | #include "window.h" | 19 | #include "window.h" |
112 | 21 | 20 | ||
113 | 22 | #include <QOpenGLFramebufferObject> | 21 | #include <QOpenGLFramebufferObject> |
114 | 23 | #include <QtPlatformSupport/private/qeglconvenience_p.h> | 22 | #include <QtPlatformSupport/private/qeglconvenience_p.h> |
115 | 23 | #include <QtPlatformSupport/private/qeglpbuffer_p.h> | ||
116 | 24 | #include <QtGui/private/qopenglcontext_p.h> | 24 | #include <QtGui/private/qopenglcontext_p.h> |
117 | 25 | 25 | ||
118 | 26 | Q_LOGGING_CATEGORY(ubuntumirclientGraphics, "ubuntumirclient.graphics", QtWarningMsg) | 26 | Q_LOGGING_CATEGORY(ubuntumirclientGraphics, "ubuntumirclient.graphics", QtWarningMsg) |
119 | @@ -74,42 +74,35 @@ | |||
120 | 74 | 74 | ||
121 | 75 | bool UbuntuOpenGLContext::makeCurrent(QPlatformSurface* surface) | 75 | bool UbuntuOpenGLContext::makeCurrent(QPlatformSurface* surface) |
122 | 76 | { | 76 | { |
143 | 77 | Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface); | 77 | const bool ret = QEGLPlatformContext::makeCurrent(surface); |
144 | 78 | 78 | ||
145 | 79 | if (surface->surface()->surfaceClass() == QSurface::Offscreen) { | 79 | if (Q_LIKELY(ret)) { |
146 | 80 | auto offscreen = static_cast<UbuntuOffscreenSurface *>(surface); | 80 | QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context()); |
147 | 81 | if (!offscreen->buffer()) { | 81 | if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround()) { |
148 | 82 | auto buffer = new QOpenGLFramebufferObject(surface->surface()->size()); | 82 | ctx_d->workaround_brokenFBOReadBack = true; |
149 | 83 | offscreen->setBuffer(buffer); | 83 | } |
130 | 84 | } | ||
131 | 85 | return offscreen->buffer()->bind(); | ||
132 | 86 | } else { | ||
133 | 87 | const bool ret = QEGLPlatformContext::makeCurrent(surface); | ||
134 | 88 | |||
135 | 89 | if (Q_LIKELY(ret)) { | ||
136 | 90 | QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context()); | ||
137 | 91 | if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround()) { | ||
138 | 92 | ctx_d->workaround_brokenFBOReadBack = true; | ||
139 | 93 | } | ||
140 | 94 | } | ||
141 | 95 | |||
142 | 96 | return ret; | ||
150 | 97 | } | 84 | } |
151 | 85 | return ret; | ||
152 | 98 | } | 86 | } |
153 | 99 | 87 | ||
154 | 100 | // Following method used internally in the base class QEGLPlatformContext to access | 88 | // Following method used internally in the base class QEGLPlatformContext to access |
155 | 101 | // the egl surface of a QPlatformSurface/UbuntuWindow | 89 | // the egl surface of a QPlatformSurface/UbuntuWindow |
156 | 102 | EGLSurface UbuntuOpenGLContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface) | 90 | EGLSurface UbuntuOpenGLContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface) |
157 | 103 | { | 91 | { |
160 | 104 | auto ubuntuWindow = static_cast<UbuntuWindow *>(surface); | 92 | if (surface->surface()->surfaceClass() == QSurface::Window) { |
161 | 105 | return ubuntuWindow->eglSurface(); | 93 | return static_cast<UbuntuWindow *>(surface)->eglSurface(); |
162 | 94 | } else { | ||
163 | 95 | return static_cast<QEGLPbuffer *>(surface)->pbuffer(); | ||
164 | 96 | } | ||
165 | 106 | } | 97 | } |
166 | 107 | 98 | ||
167 | 108 | void UbuntuOpenGLContext::swapBuffers(QPlatformSurface *surface) | 99 | void UbuntuOpenGLContext::swapBuffers(QPlatformSurface *surface) |
168 | 109 | { | 100 | { |
169 | 110 | QEGLPlatformContext::swapBuffers(surface); | 101 | QEGLPlatformContext::swapBuffers(surface); |
170 | 111 | 102 | ||
174 | 112 | // notify window on swap completion | 103 | if (surface->surface()->surfaceClass() == QSurface::Window) { |
175 | 113 | auto ubuntuWindow = static_cast<UbuntuWindow *>(surface); | 104 | // notify window on swap completion |
176 | 114 | ubuntuWindow->onSwapBuffersDone(); | 105 | auto ubuntuWindow = static_cast<UbuntuWindow *>(surface); |
177 | 106 | ubuntuWindow->onSwapBuffersDone(); | ||
178 | 107 | } | ||
179 | 115 | } | 108 | } |
180 | 116 | 109 | ||
181 | === modified file 'src/ubuntumirclient/integration.cpp' | |||
182 | --- src/ubuntumirclient/integration.cpp 2016-08-24 12:40:30 +0000 | |||
183 | +++ src/ubuntumirclient/integration.cpp 2016-09-28 10:56:31 +0000 | |||
184 | @@ -18,11 +18,11 @@ | |||
185 | 18 | #include "integration.h" | 18 | #include "integration.h" |
186 | 19 | #include "backingstore.h" | 19 | #include "backingstore.h" |
187 | 20 | #include "clipboard.h" | 20 | #include "clipboard.h" |
188 | 21 | #include "desktopwindow.h" | ||
189 | 21 | #include "glcontext.h" | 22 | #include "glcontext.h" |
190 | 22 | #include "input.h" | 23 | #include "input.h" |
191 | 23 | #include "logging.h" | 24 | #include "logging.h" |
192 | 24 | #include "nativeinterface.h" | 25 | #include "nativeinterface.h" |
193 | 25 | #include "offscreensurface.h" | ||
194 | 26 | #include "screen.h" | 26 | #include "screen.h" |
195 | 27 | #include "theme.h" | 27 | #include "theme.h" |
196 | 28 | #include "window.h" | 28 | #include "window.h" |
197 | @@ -30,13 +30,16 @@ | |||
198 | 30 | // Qt | 30 | // Qt |
199 | 31 | #include <QFileInfo> | 31 | #include <QFileInfo> |
200 | 32 | #include <QGuiApplication> | 32 | #include <QGuiApplication> |
201 | 33 | #include <private/qeglpbuffer_p.h> | ||
202 | 33 | #include <qpa/qplatformnativeinterface.h> | 34 | #include <qpa/qplatformnativeinterface.h> |
203 | 34 | #include <qpa/qplatforminputcontextfactory_p.h> | 35 | #include <qpa/qplatforminputcontextfactory_p.h> |
204 | 35 | #include <qpa/qplatforminputcontext.h> | 36 | #include <qpa/qplatforminputcontext.h> |
205 | 36 | #include <QtPlatformSupport/private/qeglconvenience_p.h> | 37 | #include <QtPlatformSupport/private/qeglconvenience_p.h> |
206 | 37 | #include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h> | 38 | #include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h> |
207 | 38 | #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h> | 39 | #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h> |
208 | 40 | #include <QtPlatformSupport/private/qeglpbuffer_p.h> | ||
209 | 39 | #include <QOpenGLContext> | 41 | #include <QOpenGLContext> |
210 | 42 | #include <QOffscreenSurface> | ||
211 | 40 | 43 | ||
212 | 41 | // platform-api | 44 | // platform-api |
213 | 42 | #include <ubuntu/application/lifecycle_delegate.h> | 45 | #include <ubuntu/application/lifecycle_delegate.h> |
214 | @@ -210,21 +213,17 @@ | |||
215 | 210 | 213 | ||
216 | 211 | QPlatformWindow* UbuntuClientIntegration::createPlatformWindow(QWindow* window) const | 214 | QPlatformWindow* UbuntuClientIntegration::createPlatformWindow(QWindow* window) const |
217 | 212 | { | 215 | { |
219 | 213 | return new UbuntuWindow(window, mInput, mNativeInterface, mEglDisplay, mMirConnection); | 216 | if (window->type() == Qt::Desktop) { |
220 | 217 | // Desktop windows should not be backed up by a mir surface as they don't draw anything (nor should). | ||
221 | 218 | return new UbuntuDesktopWindow(window); | ||
222 | 219 | } else { | ||
223 | 220 | return new UbuntuWindow(window, mInput, mNativeInterface, mEglDisplay, mMirConnection); | ||
224 | 221 | } | ||
225 | 214 | } | 222 | } |
226 | 215 | 223 | ||
227 | 216 | bool UbuntuClientIntegration::hasCapability(QPlatformIntegration::Capability cap) const | 224 | bool UbuntuClientIntegration::hasCapability(QPlatformIntegration::Capability cap) const |
228 | 217 | { | 225 | { |
229 | 218 | switch (cap) { | 226 | switch (cap) { |
230 | 219 | case ThreadedPixmaps: | ||
231 | 220 | return true; | ||
232 | 221 | |||
233 | 222 | case OpenGL: | ||
234 | 223 | return true; | ||
235 | 224 | |||
236 | 225 | case ApplicationState: | ||
237 | 226 | return true; | ||
238 | 227 | |||
239 | 228 | case ThreadedOpenGL: | 227 | case ThreadedOpenGL: |
240 | 229 | if (qEnvironmentVariableIsEmpty("QTUBUNTU_NO_THREADED_OPENGL")) { | 228 | if (qEnvironmentVariableIsEmpty("QTUBUNTU_NO_THREADED_OPENGL")) { |
241 | 230 | return true; | 229 | return true; |
242 | @@ -232,8 +231,16 @@ | |||
243 | 232 | qCDebug(ubuntumirclient, "disabled threaded OpenGL"); | 231 | qCDebug(ubuntumirclient, "disabled threaded OpenGL"); |
244 | 233 | return false; | 232 | return false; |
245 | 234 | } | 233 | } |
246 | 234 | |||
247 | 235 | case ThreadedPixmaps: | ||
248 | 236 | case OpenGL: | ||
249 | 237 | case ApplicationState: | ||
250 | 235 | case MultipleWindows: | 238 | case MultipleWindows: |
251 | 236 | case NonFullScreenWindows: | 239 | case NonFullScreenWindows: |
252 | 240 | #if QT_VERSION > QT_VERSION_CHECK(5, 5, 0) | ||
253 | 241 | case SwitchableWidgetComposition: | ||
254 | 242 | #endif | ||
255 | 243 | case RasterGLSurface: // needed for QQuickWidget | ||
256 | 237 | return true; | 244 | return true; |
257 | 238 | default: | 245 | default: |
258 | 239 | return QPlatformIntegration::hasCapability(cap); | 246 | return QPlatformIntegration::hasCapability(cap); |
259 | @@ -319,7 +326,7 @@ | |||
260 | 319 | QPlatformOffscreenSurface *UbuntuClientIntegration::createPlatformOffscreenSurface( | 326 | QPlatformOffscreenSurface *UbuntuClientIntegration::createPlatformOffscreenSurface( |
261 | 320 | QOffscreenSurface *surface) const | 327 | QOffscreenSurface *surface) const |
262 | 321 | { | 328 | { |
264 | 322 | return new UbuntuOffscreenSurface(surface); | 329 | return new QEGLPbuffer(mEglDisplay, surface->requestedFormat(), surface); |
265 | 323 | } | 330 | } |
266 | 324 | 331 | ||
267 | 325 | void UbuntuClientIntegration::destroyScreen(UbuntuScreen *screen) | 332 | void UbuntuClientIntegration::destroyScreen(UbuntuScreen *screen) |
268 | 326 | 333 | ||
269 | === removed file 'src/ubuntumirclient/offscreensurface.cpp' | |||
270 | --- src/ubuntumirclient/offscreensurface.cpp 2016-01-04 17:18:51 +0000 | |||
271 | +++ src/ubuntumirclient/offscreensurface.cpp 1970-01-01 00:00:00 +0000 | |||
272 | @@ -1,47 +0,0 @@ | |||
273 | 1 | /* | ||
274 | 2 | * Copyright (C) 2016 Canonical, Ltd. | ||
275 | 3 | * | ||
276 | 4 | * This program is free software: you can redistribute it and/or modify it under | ||
277 | 5 | * the terms of the GNU Lesser General Public License version 3, as published by | ||
278 | 6 | * the Free Software Foundation. | ||
279 | 7 | * | ||
280 | 8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
281 | 9 | * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, | ||
282 | 10 | * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
283 | 11 | * Lesser General Public License for more details. | ||
284 | 12 | * | ||
285 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
286 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
287 | 15 | */ | ||
288 | 16 | |||
289 | 17 | #include "offscreensurface.h" | ||
290 | 18 | |||
291 | 19 | #include <QOffscreenSurface> | ||
292 | 20 | #include <QOpenGLFramebufferObject> | ||
293 | 21 | |||
294 | 22 | UbuntuOffscreenSurface::UbuntuOffscreenSurface(QOffscreenSurface *offscreenSurface) | ||
295 | 23 | : QPlatformOffscreenSurface(offscreenSurface) | ||
296 | 24 | , m_buffer(nullptr) | ||
297 | 25 | , m_format(offscreenSurface->requestedFormat()) | ||
298 | 26 | { | ||
299 | 27 | } | ||
300 | 28 | |||
301 | 29 | QSurfaceFormat UbuntuOffscreenSurface::format() const | ||
302 | 30 | { | ||
303 | 31 | return m_format; | ||
304 | 32 | } | ||
305 | 33 | |||
306 | 34 | bool UbuntuOffscreenSurface::isValid() const | ||
307 | 35 | { | ||
308 | 36 | return m_buffer != nullptr && m_buffer->isValid(); | ||
309 | 37 | } | ||
310 | 38 | |||
311 | 39 | QOpenGLFramebufferObject* UbuntuOffscreenSurface::buffer() const | ||
312 | 40 | { | ||
313 | 41 | return m_buffer; | ||
314 | 42 | } | ||
315 | 43 | |||
316 | 44 | void UbuntuOffscreenSurface::setBuffer(QOpenGLFramebufferObject *buffer) | ||
317 | 45 | { | ||
318 | 46 | m_buffer = buffer; | ||
319 | 47 | } | ||
320 | 48 | 0 | ||
321 | === removed file 'src/ubuntumirclient/offscreensurface.h' | |||
322 | --- src/ubuntumirclient/offscreensurface.h 2016-01-04 17:18:51 +0000 | |||
323 | +++ src/ubuntumirclient/offscreensurface.h 1970-01-01 00:00:00 +0000 | |||
324 | @@ -1,41 +0,0 @@ | |||
325 | 1 | /* | ||
326 | 2 | * Copyright (C) 2016 Canonical, Ltd. | ||
327 | 3 | * | ||
328 | 4 | * This program is free software: you can redistribute it and/or modify it under | ||
329 | 5 | * the terms of the GNU Lesser General Public License version 3, as published by | ||
330 | 6 | * the Free Software Foundation. | ||
331 | 7 | * | ||
332 | 8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
333 | 9 | * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, | ||
334 | 10 | * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
335 | 11 | * Lesser General Public License for more details. | ||
336 | 12 | * | ||
337 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
338 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
339 | 15 | */ | ||
340 | 16 | |||
341 | 17 | #ifndef UBUNTU_OFFSCREEN_SURFACE_H | ||
342 | 18 | #define UBUNTU_OFFSCREEN_SURFACE_H | ||
343 | 19 | |||
344 | 20 | #include <qpa/qplatformoffscreensurface.h> | ||
345 | 21 | #include <QSurfaceFormat> | ||
346 | 22 | |||
347 | 23 | class QOpenGLFramebufferObject; | ||
348 | 24 | |||
349 | 25 | class UbuntuOffscreenSurface : public QPlatformOffscreenSurface | ||
350 | 26 | { | ||
351 | 27 | public: | ||
352 | 28 | UbuntuOffscreenSurface(QOffscreenSurface *offscreenSurface); | ||
353 | 29 | |||
354 | 30 | QSurfaceFormat format() const override; | ||
355 | 31 | bool isValid() const override; | ||
356 | 32 | |||
357 | 33 | QOpenGLFramebufferObject* buffer() const; | ||
358 | 34 | void setBuffer(QOpenGLFramebufferObject *buffer); | ||
359 | 35 | |||
360 | 36 | private: | ||
361 | 37 | QOpenGLFramebufferObject *m_buffer; | ||
362 | 38 | QSurfaceFormat m_format; | ||
363 | 39 | }; | ||
364 | 40 | |||
365 | 41 | #endif // UBUNTU_OFFSCREEN_SURFACE_H | ||
366 | 42 | 0 | ||
367 | === modified file 'src/ubuntumirclient/ubuntumirclient.pro' | |||
368 | --- src/ubuntumirclient/ubuntumirclient.pro 2016-08-24 12:40:30 +0000 | |||
369 | +++ src/ubuntumirclient/ubuntumirclient.pro 2016-09-28 10:56:31 +0000 | |||
370 | @@ -18,11 +18,11 @@ | |||
371 | 18 | backingstore.cpp \ | 18 | backingstore.cpp \ |
372 | 19 | clipboard.cpp \ | 19 | clipboard.cpp \ |
373 | 20 | cursor.cpp \ | 20 | cursor.cpp \ |
374 | 21 | desktopwindow.cpp \ | ||
375 | 21 | glcontext.cpp \ | 22 | glcontext.cpp \ |
376 | 22 | input.cpp \ | 23 | input.cpp \ |
377 | 23 | integration.cpp \ | 24 | integration.cpp \ |
378 | 24 | nativeinterface.cpp \ | 25 | nativeinterface.cpp \ |
379 | 25 | offscreensurface.cpp \ | ||
380 | 26 | platformservices.cpp \ | 26 | platformservices.cpp \ |
381 | 27 | plugin.cpp \ | 27 | plugin.cpp \ |
382 | 28 | screen.cpp \ | 28 | screen.cpp \ |
383 | @@ -34,12 +34,12 @@ | |||
384 | 34 | backingstore.h \ | 34 | backingstore.h \ |
385 | 35 | clipboard.h \ | 35 | clipboard.h \ |
386 | 36 | cursor.h \ | 36 | cursor.h \ |
387 | 37 | desktopwindow.h \ | ||
388 | 37 | glcontext.h \ | 38 | glcontext.h \ |
389 | 38 | input.h \ | 39 | input.h \ |
390 | 39 | integration.h \ | 40 | integration.h \ |
391 | 40 | logging.h \ | 41 | logging.h \ |
392 | 41 | nativeinterface.h \ | 42 | nativeinterface.h \ |
393 | 42 | offscreensurface.h \ | ||
394 | 43 | orientationchangeevent_p.h \ | 43 | orientationchangeevent_p.h \ |
395 | 44 | platformservices.h \ | 44 | platformservices.h \ |
396 | 45 | plugin.h \ | 45 | plugin.h \ |
PASSED: Continuous integration, rev:335 /unity8- jenkins. ubuntu. com/job/ lp-qtubuntu- ci/124/ /unity8- jenkins. ubuntu. com/job/ build/2973 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3001 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2859/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 2859 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 2859/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-qtubuntu- ci/124/ rebuild
https:/