Skip to content
  • Keith Packard's avatar
    glamor: Add accelerated stipple support · bd3b2c48
    Keith Packard authored and Emma Anholt's avatar Emma Anholt committed
    
    
    This copies the stipple to a 8bpp pixmap and uses that to paint the
    texture from.
    
    v2: Create deep stipple pixmap without GLAMOR_CREATE_FBO_NO_FBO
    
    v3: Fix stipple origin sign (matches tiles now). Track changes
        to original stipple with damage. This isn't required by the
        X spec, but java appears to depend on it, so we'll just do it.
        When Glamor switches to 8bpp bitmaps, we'll be able to render
        directly from them and not need this anymore.
    
    v4: Review comments from Eric:
    
        * Remove stray whitespace change
        * Avoid "large" pixmap for stipple by using GLAMOR_CREATE_NO_LARGE
        * Wrap to 80 columns
    
    v5: Don't crash when stipple damage tracker is destroyed
    
        The stipple damage tracker is automatically destroyed when the
        associated stipple pixmap is destroyed. When this happens, just
        clear the pointer from the GC rather than calling
        glamor_invalidate_stipple; that function would call
        DamageUnregister on the now invalid stipple damage pointer and
        crash.
    
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    bd3b2c48