After a renewed discussion, it was pointed out that the API in Cairo was
not restrictive and by using doubles we would be consisted with the rest
of the API. Thus prompting the name change to
cairo_surface_create_for_rectangle()
similar to cairo_rectangle().
And document the public API.
In the XCopyArea region code, don't modify src_x/y when they are later
used in the unbounded fixup code.
Exposed by composite-integer-translate-source test.
The extents clip regions that were created for unbounded operators were
not translated properly. This has been changed now.
This is a followup to 9ce8bef9d6.
_atomic_fetch() was expected to replace the content of a slot with
NULL and return the old content, but it incorrectly returned the
previous content even if it was unable to perform the exchange
(because of conflicts with other threads accessing the pool).
Fix suggested by Chris Wilson <chris@chris-wilson.co.uk>
Some implementations only offer one version of compare-and-exchange,
thus we expose both through cairo-atomic, implementing what is missing
through appropriate fallbacks.
*_cmpxchg() now return a boolean (this unbreaks _cairo_atomic_uint_cmpxchg)
*_cmpxchg_return_old() return the old value
Code is updated everywhere to reflect this, by using *_cmpxchg()
wherever the returned value was only tested to check if the exchange
had really taken place.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
_cairo_atomic_int_set() was only used in the definition of
CAIRO_REFERENCE_SET_VALUE, which was never used.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise unbounded operators will clear the full surface.
Improves the score for the unbounded-operator test, in particular the
output for the test-fallback case.
Use a similar surface to create an equivalent backing surface for
any backend, thus enabling the test to run against any target.
The comment about forcing fallbacks has long since been false.
The issue being that as the on-stack data is being referenced via a
zero-copy snapshot outside of the functions scope as the surface is only
finished and the source written long after the draw() returns. The
correct procedure is that the user must call cairo_surface_finish()
prior to any surface becoming inaccessible. In this case, this triggers
the snapshot to preserve a copy of the data whilst it is still valid.
Path creation can only fail because of the callbacks, but in quartz
they all return CAIRO_STATUS_SUCCESS. Therefore we can just assert
that path creation was successful and simplify calling functions
(as they don't have to handle potential errors anymore).
In order to reuse the original image as the pixman pattern, then the
entire operation must be wholly contained within the extents of the
image (including subsurfaces) and be reducible to an untransformed
REPEAT_NONE.
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
trace.c:1154: warning: ‘_has_font_face_id’ defined but not used
trace.c:1196: warning: ‘_get_pattern_id’ defined but not used
trace.c:1870: warning: ‘_emit_font_face’ defined but not used
trace.c:1882: warning: ‘_emit_scaled_font’ defined but not used
airo-region.c: In function ‘cairo_region_intersect’:
cairo-region.c:503: warning: passing argument 3 of
‘pixman_region32_intersect’ discards qualifiers from pointer target type
/usr/local/include/pixman-1/pixman.h:518: note: expected ‘struct
pixman_region32_t *’ but argument is of type ‘const struct pixman_region32_t *’
cairo-region.c: In function ‘cairo_region_union’:
cairo-region.c:566: warning: passing argument 3 of
‘pixman_region32_union’ discards qualifiers from pointer target type
/usr/local/include/pixman-1/pixman.h:521: note: expected ‘struct
pixman_region32_t *’ but argument is of type ‘const struct pixman_region32_t *’