Bug 70541 - XRenderCompositeGlyphs sometimes bypasses window-clipping [SNA]
Summary: XRenderCompositeGlyphs sometimes bypasses window-clipping [SNA]
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-16 18:03 UTC by Clemens Eisserer
Modified: 2013-10-16 21:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
testcase (1.71 KB, text/plain)
2013-10-16 18:03 UTC, Clemens Eisserer
no flags Details

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.