Bug 70541

Summary: XRenderCompositeGlyphs sometimes bypasses window-clipping [SNA]
Product: xorg Reporter: Clemens Eisserer <linuxhippy>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
testcase none

Description Clemens Eisserer 2013-10-16 18:03:54 UTC
Created attachment 87750 [details]
testcase

Running the attached testcase the text rendering isn't clipped to the coordinates of the java window, but instead I get the glyphs all over my screen.

How to reproduce:
1. Compile: javac TextClipTest.java
2. Run: java -Dsun.java2d.xrender=True TextClipTest
Comment 1 Clemens Eisserer 2013-10-16 18:30:31 UTC
Bad news, it seems there are two bugs:
1. The window clipping isn't honored
2. for very long strings, there is a coordinate wrap (which does not happen with NoAccel)
Comment 2 Chris Wilson 2013-10-16 20:44:31 UTC
Long strings be damned. Grr.
Comment 3 Chris Wilson 2013-10-16 21:57:15 UTC
commit ec0866e86d365ae3fd9790b1b263d49fc4981220
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Oct 16 22:39:54 2013 +0100

    sna/glyphs: Fix computation of extents for long strings
    
    And make sure we consider such overflowing strings for correct clipping
    against Windows.
    
    To offset the cost of doing a full extents check (~10% on aa10text), we
    introduce an approximate extents query (~1% on aa10text). The disparity
    should be rare, and should be an overestimate to force redundant
    clipping.
    
    Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70541
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.