1. 08 May, 2022 1 commit
    • Benjamin Moody's avatar
      gdk_cairo_draw_from_gl: fix red/blue swapping on GLES · 7dc52ee1
      Benjamin Moody authored
      In the "software fallback" case, when we are trying to draw a
      renderbuffer or texture onto a cairo surface and we don't have an
      accelerated way to do so with GL, we must read the pixel data from GL
      into a cairo image.
      
      In the case of desktop GL, we can read the image in cairo's native
      format (CAIRO_FORMAT_ARGB32 or CAIRO_FORMAT_RGB24) since both of these
      are equivalent to "GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV".
      
      In the case of GLES, the only format that glReadPixels is required to
      support is "GL_RGBA, GL_UNSIGNED_BYTE".  Some GLES implementations
      (including Mesa and ANGLE) allow using "GL_BGRA, GL_UNSIGNED_BYTE"
      instead.  But there doesn't appear to be a way for the implementation
      to advertise this capability.  (The GL_EXT_read_format_bgra extension
      appears to *permit* the capability, but not to *require* it unless
      BGRA is the actual internal storage format.)
      
      Currently we're assuming that if we're using GLES on Windows, we must
      be using ANGLE and therefore BGRA format must be supported.  (This
      assumption seems dubious.)
      
      But in any case, if we don't know that the implementation supports the
      non-standard BGRA format, we must use RGBA; we then need to swap the
      channels to the order that cairo expects.
      7dc52ee1
  2. 08 Apr, 2022 2 commits
  3. 02 Apr, 2022 1 commit
  4. 01 Apr, 2022 1 commit
  5. 27 Mar, 2022 1 commit
  6. 25 Mar, 2022 1 commit
  7. 24 Mar, 2022 1 commit
  8. 22 Mar, 2022 1 commit
  9. 18 Mar, 2022 1 commit
  10. 15 Mar, 2022 1 commit
  11. 14 Mar, 2022 2 commits
  12. 12 Mar, 2022 1 commit
  13. 11 Mar, 2022 3 commits
  14. 08 Mar, 2022 2 commits
  15. 07 Mar, 2022 1 commit
  16. 05 Mar, 2022 1 commit
  17. 04 Mar, 2022 1 commit
  18. 03 Mar, 2022 3 commits
  19. 01 Mar, 2022 3 commits
  20. 28 Feb, 2022 2 commits
  21. 27 Feb, 2022 2 commits
  22. 26 Feb, 2022 1 commit
  23. 25 Feb, 2022 3 commits
  24. 24 Feb, 2022 2 commits
  25. 22 Feb, 2022 2 commits