| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FT change is because my MinGW build is using a more recent version
of FT.
Remove the disabled _cairo_win32_scaled_font_text_to_glyphs() code to
fix the defined but not used warning.
_cairo_win32_scaled_font_text_to_glyphs() was diabled in d9408041aa with
the comment:
"Currently disable the win32-font text_to_glyphs(), until that one
is updated. Or better yet, remove it and implement
ucs4_to_index(). It's the toy font API afterall."
_cairo_win32_scaled_font_ucs4_to_index() was added in d1c619bc7d.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To fix this warning:
../src/cairo-malloc-private.h:83:32: warning: comparison is always false due to limited range of data type [-Wtype-limits]
83 | ((size) != 0 && (size_t) (a) >= SIZE_MAX / (size_t) (size) ? NULL : \
| ^~
Create two new macros to do the overflow checks:
_cairo_addl_size_t_overflow and _cairo_mul_size_t_overflow. Implement
them using compiler builtins where available.
Update cairo-malloc-private to use these fuctions and add an overflow
test to test the functions.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We *always* generate this file, and we depend on its existence.
The idea behind HAVE_CONFIG_H was being able to include random files
from different projects, back in a time where "libraries" were literally
just random files instead of actual shared objects.
Since we're not in the '80s any more, and our build system(s) define
HAVE_CONFIG_H *and* generate the config.h header file, we don't need a
conditional guard around its inclusion.
|
|
|
|
|
|
|
| |
- vsnprintf and snprintf are available since vs2015
- define ISREG if not provided
- guard unistd.h include with HAVE_UNISTD_H
- isnan() is available after vs2010
|
| |
|
|
|
|
| |
This works around http://llvm.org/PR20216.
|
|
|
|
|
| |
clang-cl doesn't support this and we don't gain much
from using it.
|
|
|
|
|
|
| |
Cairo fails to build with VC11 because it tries to #define inline,
which is a keyword in C++. VC11's xkeycheck.h catches this with an #error.
https://bugzilla.mozilla.org/show_bug.cgi?id=694797
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
Reuse the freed-pool system to reduce allocation pressure of context
creation/destruction.
As a side effect, this removes the use of ffs() on Win32, cleaning up
some MSVC-specific code and fixing a mingw-related build issue.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=30277
|
|
|
|
|
| |
gcc provides the hidden visibility attribute on Darwin, which can be
used to deny access to private cairo symbols.
|
|
|
|
|
| |
Some POSIX functions are deprecated in MSVC and should instead be used
with an alternative name beginning with '_'.
|
|
|
|
|
|
| |
This reverts commit de2c5bfa19ce6b3fda50bca3445aabc040947bc9.
fmax() is not used anymore and should not be used in future.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The slim_hidden_* macro definitions are rather cryptic at first
sight and I keep needing to rederive how they work just find out
what they're supposed to do. This patch adds a comment explaining
how they're used and work.
|
|
|
|
|
|
| |
Some functions declared in MacOS X headers use the always_inline
attribute, thus defining it to be a different expression breaks the
build.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This variant uses the Bentley-Ottmann algorithm to only maintain the
active edge list upon edge events and so can efficiently skip areas
where no change occurs. This means that it can be much quicker than the
Tor algorithm (which is still used to compute the coverages from the
active edges) for geometries consisting of long straight lines with few
intersections. However due to the computational overhead of the
Bentley-Ottmann event processing, for dense curvy paths, simply updating
the active edge list in sync with computing the coverages is a win. Due
to advantageous adaptive step size, the scan converter can be run at a
much higher subsampling with little extra overhead compared with Tor,
currently it uses a 256x256 subsampling grid to avoid any impedance
mismatch with path precision.
Given the current status of implementations, this scan converter [botor]
is likely to be advantage where detecting large regions of unchanged
span data will result in improved performance, for instance the drm
backends which convert the scan data into rectangles.
|
|
|
|
| |
The hypot symbol is deprecated on Win32, and nonexistent on Windows CE
|
|
|
|
|
| |
The current definition of CAIRO_ENSURE_UNIQUE uses x86 assembly so make sure we
only compile it when targeting x86.
|
|
|
|
|
|
|
|
|
| |
When using MSVC, _cairo_error() can be folded into other identical functions.
If that happens, _cairo_error isn't really useful anymore. Using the
CAIRO_ENSURE_UNIQUE macro makes sure this doesn't happen.
Use __asm to serve as a line delimiter. This allows us to use the
__asm{} block in a macro.
|
|
|
|
|
|
|
|
| |
This reverts commit 126824f5e6279f56dab0c040394b6c326b848cf7.
It turns out MSVC doesn't handle line continuation characters in __asm{}
blocks very well, so revert for now until I come up with something that
works.
|
|
|
|
|
|
| |
When using MSVC, _cairo_error() can be folded into other identical functions. If
that happens, _cairo_error isn't really useful anymore. Using the
CAIRO_ENSURE_UNIQUE macro makes sure this doesn't happen.
|
|
|
|
|
|
| |
Commit bf62798b1284533e28b78717dac8070ca6d29e54 added a diversion for
popen but not for pclose. This is needed for linking the boilerplate
with the test suite.
|
|
|
|
|
|
|
|
| |
Behdad prefers these to be upper-case to be consistent with G_UNLIKELY and
friends. However, as I intend to use these for nearly all instances of
if(status), I suggest that we keep to the short and not so loud:
if (unlikely (status))
return status;
|
|
|
|
|
| |
Define the couple of standard macros that we can use to guide gcc
optimisations of which code path will be most likely taken.
|
|
|
|
|
|
| |
func_regexp was incorrectly complaining that cairo_pure was a function without
parenthesis. The simplest solution appeared to be allow quoting of
'cairo_pure'.
|
|
|
|
|
|
|
| |
Carl suggested that cairo_pure and cairo_const are pretty opaque, even to
the developer who added them, so it is extremely important that they have
a good description so that they are used correctly and perhaps ported to
other compilers.
|
|
|
|
|
|
| |
'const' is a stricter form of 'pure' in that functions declared with that
attribute do not access any values other than their arguments (in
contrast to 'pure' which is allowed to read from global memory).
|
|
|
|
|
|
|
| |
Take advantage of the gcc function attribute 'pure', which tells gcc that
the function result only depends upon its arguments and it has zero side
effects (e.g. it does not clobber memory). This gives gcc greater
opportunity to rearrange and optimize the wideint arithmetic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The macros CAIRO_BEGIN_DECLS and CAIRO_END_DECLS are declared in two
places: config.h and cairo.h. On Win32 build there is no config.h. So,
we can't rely on pulling CAIRO_BEGIN_DECLS from there. Hence, we now:
* Not add those declarations to config.h anymore,
* Test that every cairo private header includes some other cairo
header before any other includes.
These two are fairly enough to ensure that cairo.h is seen from all
private headers. There's still the case of headers not including
any header file at all. I'll fix that later.
|
|
|
|
|
| |
Microsoft uses _popen instead of popen - required to build the
boilerplate but not actually used on Windows (by default)!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quick summary of changes:
- Move list of cairo source files out of src/Makefile.am and into
src/Sources.mk,
- Generate files src/Config.mk and src/Config.mk.win32 that choose
the right set of source files and headers based on configured
backends and features. This drastically simplifies building
using other build systems. The src/Makefile.win32 file needs
to be updated to reflect these changes.
- Add README files to various directories,
- Add toplevel HACKING file.
|
|
|
|
| |
Avoid a redefinition error when playing silly tricks with 'cpp -U__GNUC__'.
|
|
|
|
|
|
| |
One can build cairo with wine easily now:
./configure CC=winegcc LD=winegcc
|
|
|
|
|
| |
__WIN32__ is not a standard define set by MSVC; we have to check for
__WIN32__ (for mingw/gcc) and for _MSC_VER, for MSVC.
|
|
|
|
|
|
| |
Need to use __WIN32__ instead of _MSC_VER to select _snprintf in
place of snprintf when cross compiling. Otherwise all all %ld
arguments get misprinted resulting in broken PDF output.
|
|
|
|
| |
where they belong
|
|
|
|
|
|
|
|
|
|
|
|
| |
Behdad Esfahbod objected to the execution of a compiled program to check
symbol visibility as it makes cross-compilation more difficult.
Instead of executing the program, this method conditionally exports
a variable if cairo uses symbol hiding and scans the executable for
that symbol in a similar manner to check-def.sh. This has the slight
advantage of using the Makefile for performing the compilation, rather
than attempting to invoke $(CPP) from a shell script within the test
environment.
|
|
|
|
|
|
|
|
| |
Compile a trivial program such that it reports whether cairo is hiding
its internal symbols and skip the tests that depend upon it.
This prevents false errors, such as bug 12726, where the user is
presented with a scary make check failure.
|
|
The wrapping of GCC attributes (such as cairo_private) needs to be
visible to any header file, including those that avoid cairoint.h such
as cairo-boilerplate. To achieve this we move the pre-processor magic to
its own header file and include it as required.
|