D21916: egl: Create sRGB platform surfaces

Vlad Zagorodniy noreply at phabricator.kde.org
Thu Jun 20 12:07:05 BST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190620/9338fb11/attachment.html>


More information about the kwin mailing list