[Openchrome-devel] Possible incorrect composite repeat rendering

Daniel Drake dsd at laptop.org
Tue Oct 30 08:56:16 PDT 2012


I think I saw mentioned that EXA is disabled at the moment?
Anyway, I presume that is only temporary.

While working on the chrome driver I found a bug that (at least
looking at the code) looks like it would also affect openchrome.
The issue can be seen with icons in the GNOME fallback system tray -
they partially repeat outside their bounds. It can also be seen with a
small test app at http://dev.laptop.org/ticket/12138

The problem is that EXA asks us to work outside of the coordinates of
the source pixmap. The current driver/hardware behaviour here is
tiling: the out-of-bounds coordinate is wrapped into the bounds of the
source pixmap and that pixel value is used.

By some random messing around I found that textureModesT/textureModesS
controls what the hardware does w.r.t. out-of-bounds pixel accesses,
and actually the constant values for that field map exactly to the
pSrcPicture->repeat values from the render spec

9. Source and Mask Transformations

When fetching pixels from the source or mask pictures, Render provides four
options for pixel values which fall outside the drawable (this includes
pixels within a window geometry obscured by other windows).

 +	None.  Missing values are replaced with transparent.

 +	Pad.  Replace missing pixels with the nearest available
 	pixel.  Where multiple pixels are equidistant, select
	those with smallest Y and then smallest X coordinates

 +	Normal.  Select the pixel which would appear were the
 	drawable tiled to enclose the missing coordinate.  If
	the tiling doesn't cover the coordinate, use the
	selected Constant or Nearest mode.

 *	Reflect.  Select the pixel which would appear were the
	drawable tiled to enclose the missing coordinate in such a
	way that tiles in even numbered columns are reflected in the Y
	axis, and tiles in even numbered rows are reflected in the X
	axis. Tiles that in both an even numbered row and an even
	numbered column are reflected in both axes.

The chrome fix is here:
which can probably be applied to openchrome as well without much trouble.


More information about the Openchrome-devel mailing list