1. 10 Dec, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Prevent EGL headers from including Xlib headers · 6b2e6cfd
      Vlad Zahorodnii authored
      One of the annoying things about EGL headers is that they include
      platform headers by default, e.g. on X11, it's Xlib.h, etc.
      
      The problem with Xlib.h is that it uses the define compiler directive to
      declare constants and those constants have very generic names, e.g.
      'None', which typically conflict with enums, etc.
      
      In order to work around bad things coming from Xlib.h, we include
      fixx11.h file that contains some workarounds to redefine some Xlib's
      types.
      
      There's a flag or rather two flags (EGL_NO_PLATFORM_SPECIFIC_TYPES and
      EGL_NO_X11) that are cross-vendor and they can be used to prevent EGL
      headers from including platform specific headers, such as Xlib.h [1]
      
      The benefit of setting those two flags is that you can simply include
      EGL/egl.h or epoxy/egl.h and the world won't explode due to Xlib.h
      
      MESA_EGL_NO_X11_HEADERS is set to support older versions of Mesa.
      
      [1] https://github.com/KhronosGroup/EGL-Registry/pull/111
      6b2e6cfd
  2. 24 Nov, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Introduce infrastructure for compositor extensions · c766e5da
      Vlad Zahorodnii authored
      The scripting api is not suitable for implementing all features that
      should not be implemented in libkwin. For example, the krunner
      integration or screencasting are the things that don't belong to be
      compiled right into kwin and yet we don't have any other choice.
      
      This change introduces a quick and dirty plugin infrastructure that
      can be used to implement things such as colord integration, krunner
      integration, etc.
      c766e5da
  3. 19 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      screencast: Use fences to avoid stalling the graphics pipeline · 9c20df50
      Vlad Zahorodnii authored
      Currently, we use glFinish() to ensure that stream consumers don't see
      corrupted or rather incomplete buffers. This is a serious issue because
      glFinish() not only prevents the gpu from processing new GL commands,
      but it also blocks the compositor.
      
      This change addresses the blocking issue by using native fences. With
      the proposed change, after finishing recording a frame, a fence is
      inserted in the command stream. When the native fence is signaled, the
      pending pipewire buffer will be enqueued.
      
      If the EGL_ANDROID_native_fence_sync extension is not supported, we'll
      fall back to using glFinish().
      9c20df50