Skip to content
  1. Oct 11, 2016
  2. Nov 24, 2015
  3. Aug 13, 2015
    • Rui Matos's avatar
      compositor: Handle fences in the frontend X connection · 461f193c
      Rui Matos authored
      Since mutter has two X connections and does damage handling on the
      frontend while fence triggering is done on the backend, we have a race
      between XDamageSubtract() and XSyncFenceTrigger() causing missed
      redraws in the GL_EXT_X11_sync_object path.
      
      If the fence trigger gets processed first by the server, any client
      drawing that happens between that and the damage subtract being
      processed and is completely contained in the last damage event box
      that mutter got, won't be included in the current frame nor will it
      cause a new damage event.
      
      A simple fix for this would be XSync()ing on the frontend connection
      after doing all the damage subtracts but that would add a round trip
      on every frame again which defeats the asynchronous design of X
      fences.
      
      Instead, if we move fence handling to the frontend we automatically
      get the right ordering between damage subtracts and fence triggers.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=728464
      461f193c
    • Ting-Wei Lan's avatar
    • Aaron Plattner's avatar
      compositor: Fix GL_EXT_x11_sync_object race condition · 662d5046
      Aaron Plattner authored and Rui Matos's avatar Rui Matos committed
      
      
      The compositor maintains a ring of shared fences with the X server in order to
      properly synchronize rendering between the X server and the compositor's GPU
      channel.  When all of the fences have been used, the compositor needs to reset
      one so that it can be reused.  It does this by first waiting on the CPU for the
      fence to become triggered, and then sending a request to the X server to reset
      the fence.
      
      If the compositor's GPU channel is busy processing other work (e.g. the desktop
      switcher animation), then the X server may process the reset request before the
      GPU has consumed the fence.  This causes the GPU channel to hang.
      
      Fix the problem by having the compositor's GPU channel trigger its own fence
      after waiting for the X server's fence.  Wait for that fence on the CPU before
      sending the reset request to the X server.  This ensures that the GPU has
      consumed the X11 fence before the server resets it.
      
      Signed-off-by: default avatarAaron Plattner <aplattner@nvidia.com>
      
      https://bugzilla.gnome.org/show_bug.cgi?id=728464
      662d5046
    • Rui Matos's avatar
      compositor: Add support for GL_EXT_x11_sync_object · 47cb21b3
      Rui Matos authored
      If GL advertises this extension we'll use it to synchronize X with GL
      rendering instead of relying on the XSync() behavior with open source
      drivers.
      
      Some driver bugs were uncovered while working on this so if we have
      had to reboot the ring a few times, something is probably wrong and
      we're likely to just make things worse by continuing to try.  Let's
      err on the side of caution, disable ourselves and fallback to the
      XSync() path in the compositor.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=728464
      47cb21b3
  4. Mar 28, 2015
  5. Mar 27, 2015
  6. Mar 23, 2015
  7. Mar 20, 2015
  8. Mar 14, 2015
  9. Mar 03, 2015
  10. Feb 02, 2015
    • Chris Wilson's avatar
      compositor: Update composite overlay window before unredirecting · 7a57e59f
      Chris Wilson authored
      The current ordering updates the clip shape of the composite overlay
      window after unredirecting the target window. This has the effect of
      forcing X to clear the target window and sending an expose to the
      application to repaint - causing an unsightly flash. If we update the
      shape first, then unredirect, X restores the background of the root
      window (sending no expose events as no one is interested) and the
      background is typically NONE for the root window. Then the unredirect
      paints the contents of the composite backing pixmap over top without
      requiring a round trip and waiting for the client to repaint - thus no
      flashing.
      
      Fixes regression from
      
      commit d6282716
      
      
      Author: Jasper St. Pierre <jstpierre@mecheye.net>
      Date:   Fri Dec 6 17:10:44 2013 -0500
      
          compositor: Simplify the unredirected window management code
      
      Cc: Jasper St. Pierre <jstpierre@mecheye.net>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      
      https://bugzilla.gnome.org/show_bug.cgi?id=743858
      7a57e59f
  11. Jan 20, 2015
  12. Jan 19, 2015
  13. Jan 03, 2015
  14. Dec 29, 2014
  15. Dec 26, 2014
  16. Dec 19, 2014
  17. Dec 10, 2014
    • Rui Matos's avatar
      monitor-manager-xrandr: Set CRTC config even if it might be redundant · 25aa942a
      Rui Matos authored
      This optimization breaks our use of XRRScreenResources' timestamps to
      detect hotplugs in case one of the outputs is disconnected and the
      remaining ones don't need any mode, position or transform adjustments.
      
      In that scenario, when applying the new configuration, we resize the X
      screen but never call XRRSetCrtcConfig() and since XRRSetScreenSize()
      doesn't take a timestamp and the X server doesn't update its last set
      timestamp, when we next get a RRScreenChangeNotify and update
      ourselves, XRRScreenResources.timestamp will still be smaller than
      XRRScreenResources.configTimestamp which makes us think we're seeing a
      new hotplug. We just don't enter an endless loop because the screen
      size that we keep applying is always the same and the X server
      short-circuits and stops sending us RRScreenChangeNotifys.
      
      Always calling XRRSetCrtcConfig() ensures that the last set timestamp
      will be bigger than configTimestamp in the next event and thus making
      us trigger the monitors-changed signal properly.
      
      Note that the X server already does basically the same checks that
      we're removing here, so doing this shouldn't be a significant
      efficiency loss. See
      
      http://cgit.freedesktop.org/xorg/xserver/tree/randr/rrcrtc.c?h=server-1.16-branch#n539
      
      https://bugzilla.gnome.org/show_bug.cgi?id=740838
      25aa942a
  18. Dec 02, 2014
    • Owen W. Taylor's avatar
      MetaWindowActor: don't overwrite send_frame_messages_timer · 56e74b1e
      Owen W. Taylor authored
      If the app finished multiple frames before we sent _NET_WM_FRAME_DRAWN,
      we could add the send_frame_messages_timer multiple times. In the rare
      case that the app immediately closed the window, the older timeout
      could potentially then run on the freed actor.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=738686
      56e74b1e
    • Owen W. Taylor's avatar
      Fix problems resulting in left-over queued frames · 7d3204b1
      Owen W. Taylor authored
      * Use -1 rather than 0 as a flag for pending queue entries; 0 is
        a valid frame_counter value from Cogl.
      * Consistently handle the fact we can have more than one pending
        entry. It's app misbehavior to submit a new frame before
        _NET_WM_FRAME_DRAWN is received; but we accept such frame messages,
        so we can't just leak them.
      * If we remove send_frame_message_timer, assign the current frame counter
        to pending entries.
      * To try to avoid regressing on this, when sending _NET_WM_FRAME_TIMINGS
        messages, if we have stale messages, or messages with no frame drawn
        time, warn and remove them from the queue rather than just accumulating.
      * Improve commenting.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=738686
      7d3204b1
  19. Nov 26, 2014
    • Jasper St. Pierre's avatar
      window-x11: Fix windows that set empty input shapes · d7ff632c
      Jasper St. Pierre authored
      Windows that set empty input shapes get n_rects of 0 when querying them
      later, which makes sense, but the code that interpreted the result
      translated it into a NULL input shape, which meant it was the same as
      the bounding region. As such, an empty input shape would actually get
      interpreted as a full input shape!
      
      We, ourselves, set an empty input shape on tray icon windows in
      gnome-shell since we would handle the picking ourselves. This meant that
      we'd actually get the MetaSurfaceActorX11 when hovering over the tray
      icon, instead of the ShellGTKEmbed that we capture events on and react
      to.
      
      This fixes weird tray icon behavior in gnome-shell.
      d7ff632c
  20. Nov 20, 2014
  21. Nov 14, 2014
  22. Nov 12, 2014
  23. Nov 10, 2014
  24. Nov 05, 2014
  25. Oct 31, 2014
  26. Oct 30, 2014
  27. Oct 27, 2014
  28. Oct 19, 2014
  29. Oct 16, 2014
  30. Oct 15, 2014
  31. Oct 14, 2014