Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/abstract_egl_backend.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | |||||
122 | } | 122 | } | ||
123 | 123 | | |||
124 | typedef void (*eglFuncPtr)(); | 124 | typedef void (*eglFuncPtr)(); | ||
125 | static eglFuncPtr getProcAddress(const char* name) | 125 | static eglFuncPtr getProcAddress(const char* name) | ||
126 | { | 126 | { | ||
127 | return eglGetProcAddress(name); | 127 | return eglGetProcAddress(name); | ||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | GLboolean AbstractEglBackend::queryWaylandBufferWL(wl_resource *buffer, | ||||
cfeck: Does it really need to be declared `GLboolean`? You are using the logical `&&` operator anyway. | |||||
Put this function in EglStreamBackend only. On another note, do we need it at all? It's called only once. romangg: Put this function in EglStreamBackend only. On another note, do we need it at all? It's called… | |||||
131 | EGLint attribute, EGLint *value) | ||||
132 | { | ||||
133 | return eglQueryWaylandBufferWL && | ||||
134 | eglQueryWaylandBufferWL(eglDisplay(), buffer, attribute, value); | ||||
135 | } | ||||
136 | | ||||
130 | void AbstractEglBackend::initKWinGL() | 137 | void AbstractEglBackend::initKWinGL() | ||
131 | { | 138 | { | ||
132 | GLPlatform *glPlatform = GLPlatform::instance(); | 139 | GLPlatform *glPlatform = GLPlatform::instance(); | ||
133 | glPlatform->detect(EglPlatformInterface); | 140 | glPlatform->detect(EglPlatformInterface); | ||
134 | options->setGlPreferBufferSwap(options->glPreferBufferSwap()); // resolve autosetting | 141 | options->setGlPreferBufferSwap(options->glPreferBufferSwap()); // resolve autosetting | ||
135 | if (options->glPreferBufferSwap() == Options::AutoSwapStrategy) | 142 | if (options->glPreferBufferSwap() == Options::AutoSwapStrategy) | ||
136 | options->setGlPreferBufferSwap('e'); // for unknown drivers - should not happen | 143 | options->setGlPreferBufferSwap('e'); // for unknown drivers - should not happen | ||
137 | glPlatform->printResults(); | 144 | glPlatform->printResults(); | ||
▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines |
Does it really need to be declared GLboolean? You are using the logical && operator anyway.