Commit graph

11630 commits

Author SHA1 Message Date
Bryce Harrington
d67be70805 Release 1.17.2 2019-01-31 19:33:41 -08:00
luz.paz
6d93bddbd6 Misc. typos
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7d

Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-31 17:37:15 -08:00
Bryce Harrington
cb871c6c69 clip-boxes: Drop too-early return
The indentation of this line suggests it is a typo.  In any case it
causes the function to unconditionally return immediately, thereby
shortcircuiting it entirely, which does not appear to be the intended
behavior.

Fixes: https://gitlab.com/cairo/cairo/issues/2
2019-01-31 17:24:05 -08:00
Adrian Johnson
ef8c379e0f scaled-subsets: always include glyphs maps to character 0
Issue 354
2019-01-16 20:46:42 +10:30
Uli Schlachter
6edf572ebb Merge branch 'ft-crash' of gitlab.freedesktop.org:carlosgc/cairo 2019-01-09 07:50:12 +01:00
Maarten Lankhorst
d061570a70 png: Add support for 16 bpc png reading as floating point format
Similar to writing png, don't squash 16 bpc to 8 bpc and create
a float surface to contain the image.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:14:16 -08:00
Maarten Lankhorst
1df0a68460 png: Add support for writing new floating point formats as 16 bpc png.
_cairo_image_surface_coerce will round down the image to a lower
bpp when using one of the floating point formats, so don't coerce those.
This makes the code actually work for those formats.

Because a float takes more storage than u16, we have to convert float
to u16 before calling png_write_image, because png_write
doesn't give us back the original row data, but an in-place copy.

With these changes we can dump floating point files with the highest
possible accuracy, with floats clamped between 0 and 1.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:14:13 -08:00
Maarten Lankhorst
a34cb719cd Add support for RGBA128F and RGB96F formats.
IGT wants to add support for planes with a bit depth >10, which
requires a higher precision format than we have currently.

I'm using RGBA as format, because of its existence in OpenGL.
With the new formats we can directly convert our bytes to half float,
or multiply a colro vector with a matrix to go to the Y'CbCr colorspace.

This requires pixman 0.36.0, so bump the version requirement.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:10:44 -08:00
Maarten Lankhorst
87c1c19197 cairo-trace: Simplify bigendian case in emit_image.
All the cases are the same, except len is different.
Use the already calculated len parameter to handle all
cases except RGB24 the same.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Suggested-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:10:30 -08:00
Adrian Johnson
3a0670e03c tag_attributes: Allow decimal points in non decimal point locales
Issue #347
2018-12-31 12:45:06 +10:30
Uli Schlachter
4804d073e6 Remove all traces of NUM_THREADS
The code that looked at CAIRO_TEST_NUM_THREADS was removed seven years
ago in commit 6ef9779a6f, because it was dead code. I have not
managed to figure out how long exactly this code was dead already.

This commit removes the last traces of NUM_THREADS.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-12-16 09:53:07 +01:00
Uli Schlachter
c62238a1da .gitlab-ci.yml: Do a verbose build
With VERBOSE=1, a lot more stuff is printed while make runs. Perhaps
most interestingly, this prints the output of a failed test after the
test failed. Thus, this gives us the output of the test suite.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-12-16 09:53:07 +01:00
suzuki toshiya
c0ed8ce1a1 [cairo-ft-font.c] conditionalize the changes by 3ec4aa24 on 2018-07-16 for legacy FreeType2 without color font feature 2018-12-13 14:36:56 +09:00
Adrian Johnson
3c4570f8f4 ps: fix invalid matrix in eps embedding 2018-12-02 21:30:51 +10:30
Carlos Garcia Campos
90e85c2493 ft: Use FT_Done_MM_Var instead of free when available in cairo_ft_apply_variations
Fixes a crash when using freetype >= 2.9
2018-11-19 12:35:33 +01:00
Jordan Petridis
01788f5edb CI: Fix Docker image uris
Images where migrated a couple months ago to the
GNOME gitlab instance.
2018-11-11 12:59:39 +00:00
Adrian Johnson
4c8813f0ea pdf: add missing flush
Issue #342
2018-10-25 18:46:17 +10:30
Adrian Johnson
4db835c5b5 doc: fix link tags code example
The old code did not work.
2018-10-24 13:43:05 +10:30
Bryce Harrington
c66f017aa3 RELEASING: Bugzilla no longer needs updated 2018-10-22 15:47:03 -07:00
Adrian Johnson
717f0e0a40 type1: fallback if the font matrix is not a uniform scale
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1790242
2018-10-21 13:42:24 +10:30
Bryce Harrington
ec70bde74a Bump version for 1.17.1 2018-10-19 13:43:54 -07:00
Bryce Harrington
3ad43122b2 1.16.0 release
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-19 13:23:16 -07:00
Bryce Harrington
6059f5f260 test: Free resources in pdf2png
Patch proposed by Bofa.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/317
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-17 17:53:12 -07:00
Bryce Harrington
3a03c1ba4b win32: Fix regression with text containing space character
Converting a series of glyphs to a path triggers an out of memory error
if there is a space glyph (bytesGlyph==0).  The regression was
introduced by commit 19982393 in cairo-win32-font.c:107.

The behavior of malloc(0) is not well defined - it can return NULL on
some platforms, or an arbitrary (non-allocated) pointer on other
platforms.  Commit 19982393 introduced sanity by enforcing that NULL is
always returned in this situation, which inappropriately triggers the
OOM check in _cairo_win32_scaled_font_init_glyph_path().  Instead,
special case the handling for bytesGlyph==0.

Patch authored by Uli Schlachter, based on fix proposed by lb90.

Fixes:  https://gitlab.freedesktop.org/cairo/cairo/issues/339
Reference:  https://gitlab.gnome.org/GNOME/pango/issues/323
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-17 17:32:10 -07:00
Bryce Harrington
7786b8fe4e Drop skia backend
Commit 38806bc3 already disabled the backend from use, now drop the
code.
2018-10-17 17:21:03 -07:00
Paul Menzel
f246a2144f Use HTTPS URLs for gnome.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*gnome.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}gnome\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:20 -07:00
Paul Menzel
1c9201721d Use HTTPS URLs for freedesktop.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:07 -07:00
Paul Menzel
15ad6ca3e1 Use HTTPS URLs for cairographics.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*cairographics.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}cairographics\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:01 -07:00
Bryce Harrington
bf597b8928 Revert "Correctly decode Adobe CMYK JPEGs in PDF export"
From further testing and investigation it appears that many PDF viewers
already have a workaround to invert Adobe CMYK JPEGs, so our generated
PDFs display incorrectly with those viewers due to double-inversion.

Further investigation will be needed to find a better solution that
doesn't cause regression for some PDF viewers; perhaps PDF viewers that
lack this inversion workaround should be changed to include it.  For now
we'll drop the patch to avoid shipping the regression in 1.16.0.

This reverts commit b207a932a2.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=97612
Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/156
2018-10-16 09:53:00 -07:00
Bryce Harrington
868998a0f4 RELEASING: Clarify how to add the news item 2018-10-16 09:44:16 -07:00
Bryce Harrington
06ef6db957 Bump version for 1.15.15 2018-09-20 16:28:55 -07:00
Bryce Harrington
d9aaea0c1e 1.15.14 release
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-20 13:07:03 -07:00
Bryce Harrington
c1e37f4f02 doc: Drop tmpl support
Fix distcheck by dropping use of the now-obsolete gtkdoc-mktmpl.

In preparation for the upcoming 1.16 release, I've made a few changes to
get distcheck to pass.  I also updated it to run on Ubuntu 18.04, but
found that on newer distros distcheck won't run due to missing
gtkdoc-mktmpl, which has been deprecated upstream for some time.  The
patch below disables everything that references it, and enables
distcheck to finish successfully.

Unfortunately, this probably regresses portions of our document
generation, and thus will need some reimplementation work.  Anyone got
time to investigate a better solution for this?
2018-09-14 12:42:22 -07:00
Bryce Harrington
ad7ac7dbca Normalize one more test image with minor gradient differences
For me, with this fix, the base image test cases now pass 100%, when
running:

  make test TARGETS=image FORMAT=rgba

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00
Bryce Harrington
53e4775327 Normalize more test reference images with minor text rendering differences
The discrepancies in these tests appear to all be font rendering /
antialiasing, probably due to algorithmic changes in Pixman.

Some of these reference images were updated in Federico's recent patch,
so the fact that they differ on my system may indicate there may be some
system dependencies beyond just pixman, that can cause test result
variation from person to person.  Ideally, these would be isolated and
the tests modified to not have such dependencies.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00
Bryce Harrington
201791a52d gstate: Minor grammar copyedit 2018-09-05 19:12:29 -07:00
Federico Mena Quintero
2b1f096145 Normalize test reference images with minor text rendering differences
[In testing, I was able to reproduce Federico's results for most, but
not all, of the test images.  There might be some additional
platform-specific discrepancies that need ironed out, but this is a
solid step forward in any case.

Results for a quick run against just the image backend on my system:

--bryce]

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Federico Mena Quintero
fb24d7b737 Normalize test images with minor gradient differences
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Federico Mena Quintero
cfc90ca91e Normalize extended-blend-mask.{argb32,rgb24}.ref.png
I don't see how the old reference file could have been generated.
Things I tried:

* Using an old pixman (but it seems that the relevant code for Adobe
  extended blend modes has not changed?)

* Using the Cairo version where the test was first introduced.

* Changing the alpha value from .5 to something else.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Tested-by: Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Federico Mena Quintero
78a5d543b6 test/extended-blend.c: Remove obsolete comments about buggy librsvg
The comment said that using CAIRO_OPERATOR_SOURCE for the background
triggered a librsvg bug, but the relevant commit message does not even
include a link to a librsvg bug.

Also, changing it from OVER to SOURCE completely breaks these
tests (the reference images don't match at all), so this comment is
stale.  Just remove it.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Federico Mena Quintero
38fc475995 cairo-analysis-surface: Quell invalid uninitialized variable warning
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2018-09-05 17:00:44 -07:00
Bryce Harrington
5de2667b76 Fix sp. sheering
Pointed out by keith.briggs@bt.com
2018-08-24 09:33:50 -07:00
Bryce Harrington
ad57c64050 doc: Add missing symbols to sections for recently added APIs 2018-08-16 20:14:57 -07:00
Bryce Harrington
3476aa9b68 build: Sp. fix 2018-08-16 20:14:57 -07:00
Bryce Harrington
2cf141f690 Convert 3 headers to UTF8
Fix distcheck, which was failing on the copyright symbols in these
files, because their encoding was not being detected as UTF-8.
2018-08-16 20:14:57 -07:00
Behdad Esfahbod
3ec4aa24aa [ft] Implement some more color conversion routines
Makes new COLR/CPAL implementation in FreeType work with cairo now.
Ie. Microsoft's Segoe UI Emoji Regular font renders (instead of
crashing cairo.)
2018-07-16 13:55:20 +02:00
Bryce Harrington
6112212794 scaled-font: Fix glyph and cluster count checks (CID #983386)
num_glyphs and num_clusters are explicitly checked to be non-NULL at the
beginning of this routine, and by this point in the code both have been
deref'd multiple times, so checking them for NULL here again is
superfluous.

It looks like the intent here is to verify the glyphs and clusters
arrays are non-NULL unless their counts are zero, so change the tests
accordingly.

Coverity ID: #983386

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-06-15 22:15:19 -07:00
Bryce Harrington
9c7d5a49c6 gl: For glesv3 detection, use glesv2.pc + header check
There is no glesv3.pc provided by mesa, perhaps because
the glesv3 support is provided by the libGLESv2 library.
Don't bother testing for glesv3.pc, just check for glesv2.pc
and then search for the gl3.h header file.

This fixes an issue reported by Theo Veenker, where building
with glesv3 enabled would result in a cairo.pc file that depends
on the non-existant glesv3.pc.
2018-06-13 16:17:58 -07:00
Bryce Harrington
2b6b23fd8c polygon-intersection: Clarify ptr checks for right edges (CID #1160730)
The code is checking a variable is non-NULL after it's already been
dereferenced in an assert.

I'm not certain whether the assert should be conditionalized to only be
tested when right != NULL (which would allow edges_end() to still be
invoked), or if the function should assert right as non-NULL always.

Coverity ID: #1160730
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-By: Uli Schlachter <psychon@znc.in>
2018-06-13 15:21:50 -07:00
Bryce Harrington
5a4a86c27f type1-subset: Fix incorrect null ptr check from find_token() (CID #1160662)
subrs was already tested for NULL prior to this, and will never be NULL
at this point.  Meanwhile, find_token()'s return is unchecked (it can
return NULL and is checked in all other calls).  Quite clearly, this is
a copy-paste error from the prior find_token call, and the intent was to
check array_start not subrs.

Coverity ID: #1160662
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-By: Uli Schlachter <psychon@znc.in>
2018-06-13 15:21:50 -07:00