Bug 3566 - RENDER, repeating pictures and offscreen memory
Summary: RENDER, repeating pictures and offscreen memory
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-06-17 13:48 UTC by Owen Taylor
Modified: 2005-07-31 22:24 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

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.