1. 01 Apr, 2014 3 commits
    • Kristian Høgsberg's avatar
      composite: Add exception mechanism for implicit redirection policy · 4ba7b594
      Kristian Høgsberg authored
      Normally composite will decide to add implicit redirection when a
      window with an alternate visual is a parent of a window with a regular
      visual or vice versa.  This uses extra pixmap memory and incurs an extra
      copy.  This exception mechanism provides a way for a DDX to override this
      if the DDX knows that its acceleration architecture will render correctly.
      The relevant case is that of an RGB window reparented into a ARGB parent
      frame window.  If the DDX knows that the acceleration architecture in use
      will pad the alpha channel to opaque when rendering to the RGB window,
      the implicit redirection can be avoided.
      This patch adds a new composite function:
      which lets a DDX register a pair of parent and child window visuals, that
      will not be implicitly redirected even if the normal policy would have
      made that choice.
      Signed-off-by: Kristian H. Kristensen's avatarKristian Høgsberg <krh@bitplanet.net>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
    • Keith Packard's avatar
      Make XYToWindow a screen function · 73698d41
      Keith Packard authored
      This allows DDXen to override the window picking to account for
      native windows not seen by the X server.  The bulk of the picking logic
      is exposed as a new helper function, miSpriteTrace().  This function
      completes the sprite trace filled out by the caller, and can be set up
      to start the search from a given toplevel window.
      v2: Leave existing XYToWindow API in place for API compatibility
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Kristian H. Kristensen's avatarKristian Høgsberg <krh@bitplanet.net>
    • Keith Packard's avatar
  2. 29 Mar, 2014 1 commit
  3. 28 Mar, 2014 1 commit
    • Keith Packard's avatar
      fb: fix fast-path blt detection · a2880699
      Keith Packard authored
      The width parameter is used to disable the blit fast-path (memcpy) when
      source and destination rows overlap in memory. This check was added in [0].
      Unfortunately, the calculation to determine if source and destination
      lines overlapped was incorrect:
        (1) it converts width from pixels to bytes, but width is actually in
            bits, not pixels.
        (2) it adds this byte offset to dst/srcLine, which implicitly converts
            the offset from bytes to sizeof(FbBits).
      Fix both of these by converting addresses to byte pointers and width
      to bytes and doing comparisons on the resulting byte address.
      For example:
      A 32-bpp 1366 pixel-wide row will have
        width = 1366 * 32 = 43712 bits
        bpp = 32
        (bpp >> 3) = 4
        width * (bpp >> 3) = 174848 FbBits
        (FbBits *)width => 699392 bytes
      So, "careful" was true if the destination line was within 699392 bytes,
      instead of just within its 1366 * 4 = 5464 byte row.
      This bug causes us to take the slow path for large non-overlapping rows
      that are "close" in memory.  As a data point, XGetImage(1366x768) on my
      ARM chromebook was taking ~140 ms, but with this fixed, it now takes
      about 60 ms.
        XGetImage() -> exaGetImage() -> fbGetImage -> fbBlt()
      [0] commit e32cc0b4
      Author: Adam Jackson <ajax@redhat.com>
      Date:   Thu Apr 21 16:37:11 2011 -0400
          fb: Fix memcpy abuse
          The memcpy fast path implicitly assumes that the copy walks
          left-to-right.  That's not something memcpy guarantees, and newer glibc
          on some processors will indeed break that assumption.  Since we walk a
          line at a time, check the source and destination against the width of
          the blit to determine whether we can be sloppy enough to allow memcpy.
          (Having done this, we can remove the check for !reverse as well.)
      v3: Convert to byte units
      This first checks to make sure the blt is byte aligned, converts all
      of the data to byte units and then compares for byte address range
      overlap between source and dest.
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
  4. 27 Mar, 2014 7 commits
  5. 26 Mar, 2014 19 commits
  6. 25 Mar, 2014 2 commits
  7. 24 Mar, 2014 2 commits
  8. 23 Mar, 2014 4 commits
  9. 22 Mar, 2014 1 commit