[cairo-bugs] [Bug 43397] EXTEND_NONE is used instead of EXTEND_PAD when src sample area is entirely within the surface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 12 01:31:27 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=43397

--- Comment #21 from Andrea Canciani <ranma42 at gmail.com> 2012-01-12 01:31:27 PST ---
Both Cairo and Xlib use NONE as the default extend mode.
This might be considered unfortunate if current hardware is unable to
accelerate it, but it's unlikely to change, as it would break a lot of existing
software.

On the good side, Cairo normalizes repeats and guarantees that if you get
REPEAT_PAD, REPEAT_REFLECT or REPEAT_NORMAL, you will need to do that.
Conversely, when a Cairo extend mode results in Xlib's REPEAT_NONE, it can
actually mean:
 - REPEAT_NONE is actually needed
 - REPEAT_ANY cannot be represented in Xlib, hence use the default
(REPEAT_NONE)

My opinion is that it would be a good idea if drivers were able to
automatically detect if they can or cannot accelerate the operation. This would
be beneficial both for Cairo and for other clients that use Xlib directly the
default mode.

How about adding a is_repeat_any() utility function for drivers to call so that
they can detect if the repeat mode affects the result (and if not they just use
whatever repeat mode is the fastest one)?
I cannot see major cons and it seems like it could be beneficial to most driver
clients.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the cairo-bugs mailing list