Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/hwcomposer/egl_hwcomposer_backend.cpp
Show All 37 Lines | |||||
38 | { | 38 | { | ||
39 | cleanup(); | 39 | cleanup(); | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | bool EglHwcomposerBackend::initializeEgl() | 42 | bool EglHwcomposerBackend::initializeEgl() | ||
43 | { | 43 | { | ||
44 | // cannot use initClientExtensions as that crashes in libhybris | 44 | // cannot use initClientExtensions as that crashes in libhybris | ||
45 | qputenv("EGL_PLATFORM", QByteArrayLiteral("hwcomposer")); | 45 | qputenv("EGL_PLATFORM", QByteArrayLiteral("hwcomposer")); | ||
46 | EGLDisplay display = EGL_NO_DISPLAY; | 46 | EGLDisplay display = m_backend->sceneEglDisplay(); | ||
47 | 47 | | |||
48 | if (display == EGL_NO_DISPLAY) { | ||||
48 | display = eglGetDisplay(nullptr); | 49 | display = eglGetDisplay(nullptr); | ||
50 | } | ||||
49 | if (display == EGL_NO_DISPLAY) { | 51 | if (display == EGL_NO_DISPLAY) { | ||
50 | return false; | 52 | return false; | ||
51 | } | 53 | } | ||
52 | setEglDisplay(display); | 54 | setEglDisplay(display); | ||
53 | return initEglAPI(); | 55 | return initEglAPI(); | ||
54 | } | 56 | } | ||
55 | 57 | | |||
56 | void EglHwcomposerBackend::init() | 58 | void EglHwcomposerBackend::init() | ||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |