Bug 3566

Summary: RENDER, repeating pictures and offscreen memory
Product: xorg Reporter: Owen Taylor <otaylor>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: ghepeu, keithp
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 1690    

Description Owen Taylor 2005-06-17 13:48:42 UTC
The code in fb/fbpict.c that handles tiling is handling the
coordinates that have already been offset by 
pSrc/pMask->pDrawable->x,y. For a pixmap in offscreen memory,
these quantities will be non-zero, so when we do the 
modular arithmetic, the resulting coordinates no longer 
point to the pixmap but rather to a portion of the framebuffer
starting at 0,0.

I think the attached patch is correct ... it certainly fixes
the test case I was working from. I'm not completely confident
that I understand all uses of pDrawable->x,y, however. 

[ Fixing this bug is important for getting Cairo to perform 
  well; we'll have to use expensive fallbacks on older servers
  to work around this problem. ]
Comment 1 Owen Taylor 2005-06-17 13:50:00 UTC
Created attachment 2906 [details]
GPG public key
Comment 2 Chris Lee 2005-07-04 16:28:29 UTC
Owen, 
 
Can you attach the test case that you were working from for this? 
Comment 3 Owen Taylor 2005-07-05 07:00:27 UTC
http://bugzilla.gnome.org/show_bug.cgi?id=306216 has a test case, but
it depends on GTK+ and on removing the workaround from Cairo. (grep
for buggy_repeat in cairo-xlib-surface.c)

I believe the patch I've provided here is "obviously correct" (and has
been tested in practice), and while it might be nice to have a xlib 
and RENDER test case, I'm not inclined to spend the time it would take 
to write one.

Plus note that any test case will only intermittantly reproduce the
problem since it depends on the pixmap ending up in offscreen video
emory.
Comment 4 Alan Coopersmith 2005-08-02 08:24:47 UTC
Keith said it looked good to him (and that it only matters for XAA servers
anyway), so it's committed to Xorg HEAD for 6.9 RC0:

CVSROOT:	/cvs/xorg
Module name:	xc
Changes by:	alanc@gabe.freedesktop.org	05/08/01 15:22:17

Log message:
  2005-08-01  Alan Coopersmith  <alan.coopersmith@sun.com>
  
  	* programs/Xserver/fb/fbpict.c:
  	Bugzilla #3566 <https://bugs.freedesktop.org/show_bug.cgi?id=3566>
  	Patch #2906 <https://bugs.freedesktop.org/attachment.cgi?id=2906>
  	Fix for RENDER, repeating pictures and offscreen memory (Owen Taylor)

Modified files:
      ./:
        ChangeLog 
      xc/programs/Xserver/fb/:
        fbpict.c 
  
  Revision      Changes    Path
  1.1173        +7 -0      xc/ChangeLog
  1.17          +8 -4      xc/programs/Xserver/fb/fbpict.c

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.