D21916: egl: Create sRGB platform surfaces
Vlad Zagorodniy <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
zzag added inline comments.
INLINE COMMENTS
> eglonxbackend.cpp:281-285
> + surface = eglCreatePlatformWindowSurfaceEXT(eglDisplay(), config(), (void *) &window,
> + !isOpenGLES() && hasEglColorspace ? attr : nullptr);
> } else {
> - surface = eglCreateWindowSurface(eglDisplay(), config(), window, nullptr);
> + surface = eglCreateWindowSurface(eglDisplay(), config(), window,
> + !isOpenGLES() && hasEglColorspace ? attr : nullptr);
There's another way to implement this, e.g.
int nattrs = 0; // or int cursor = 0;
int attrs[] = {
EGL_NONE, EGL_NONE,
EGL_NONE
};
if (!isOpenGLES() && hasEglColorspace) {
attrs[nattrs++] = EGL_GL_COLORSPACE;
attrs[nattrs++] = EGL_GL_COLORSPACE_SRGB;
}
// ...
perhaps that's a matter of personal taste. :-)
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D21916
To: fredrik, #kwin
Cc: zzag, sbergeron, kwin, LeGast00n, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart