summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/compositor/brcm-egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardwareintegration/compositor/brcm-egl')
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp56
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h2
2 files changed, 30 insertions, 28 deletions
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
index de39ff1d2..8ddb4f951 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
@@ -67,46 +67,48 @@ BrcmEglIntegration::BrcmEglIntegration()
{
}
-void BrcmEglIntegration::initializeHardware(struct ::wl_display *display)
+bool BrcmEglIntegration::initializeHardware(struct ::wl_display *display)
{
Q_D(BrcmEglIntegration);
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
- if (nativeInterface) {
- d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
- if (!d->egl_display)
- qWarning("Failed to acquire EGL display from platform integration");
+ if (!nativeInterface)
+ return false;
- d->eglQueryGlobalImageBRCM = (PFNEGLQUERYGLOBALIMAGEBRCMPROC) eglGetProcAddress("eglQueryGlobalImageBRCM");
+ d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
+ if (!d->egl_display)
+ qWarning("Failed to acquire EGL display from platform integration");
- if (!d->eglQueryGlobalImageBRCM) {
- qWarning("Failed to resolve eglQueryGlobalImageBRCM");
- return;
- }
+ d->eglQueryGlobalImageBRCM = (PFNEGLQUERYGLOBALIMAGEBRCMPROC) eglGetProcAddress("eglQueryGlobalImageBRCM");
- d->glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
+ if (!d->eglQueryGlobalImageBRCM) {
+ qWarning("Failed to resolve eglQueryGlobalImageBRCM");
+ return false;
+ }
+
+ d->glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
- if (!d->glEGLImageTargetTexture2DOES) {
- qWarning("Failed to resolve glEGLImageTargetTexture2DOES");
- return;
- }
+ if (!d->glEGLImageTargetTexture2DOES) {
+ qWarning("Failed to resolve glEGLImageTargetTexture2DOES");
+ return false;
+ }
- d->eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
+ d->eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
- if (!d->eglCreateImageKHR) {
- qWarning("Failed to resolve eglCreateImageKHR");
- return;
- }
+ if (!d->eglCreateImageKHR) {
+ qWarning("Failed to resolve eglCreateImageKHR");
+ return false;
+ }
- d->eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
+ d->eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
- if (!d->eglDestroyImageKHR) {
- qWarning("Failed to resolve eglDestroyImageKHR");
- return;
- }
- d->valid = true;
- init(display, 1);
+ if (!d->eglDestroyImageKHR) {
+ qWarning("Failed to resolve eglDestroyImageKHR");
+ return false;
}
+ d->valid = true;
+ init(display, 1);
+ return true;
}
QtWayland::ClientBuffer *BrcmEglIntegration::createBufferFor(wl_resource *buffer)
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
index 3728da7bc..4bc98e8c5 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
@@ -47,7 +47,7 @@ class BrcmEglIntegration : public QtWayland::ClientBufferIntegration, public QtW
public:
BrcmEglIntegration();
- void initializeHardware(struct ::wl_display *display) override;
+ bool initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
protected: