Age | Commit message (Collapse) | Author | Files | Lines |
|
This dramatically speeds up testing on NVidia and actually makes it
possible to run traces within a reasonable amount of time.
cairo-perf-trace results for:
NVIDIA Corporation GeForce GTS 250/PCIe/SSE2 3.3.0 NVIDIA 310.14
Before:
test min(s) median(s) stddev. count
gvim 30.924 31.251 0.72% 5/6
firefox-fishbowl 168.751 201.017 12.46% 8/8
(exited early)
After:
test min(s) median(s) stddev. count
gvim 1.294 1.325 1.79% 6/6
firefox-fishbowl 18.540 19.104 1.54% 6/6
|
|
This is useful because the GL backend runs much faster on some drivers
when thread awareness is disabled.
|
|
Fix src bitmap coordinates, which origin is bottom-left. This is
apparently a bug in StretchDIBits(), according to some comments on
MSDN API documentation.
The backend used to have this coordinate change in the past:
if (!StretchDIBits (dst->dc,
/* dst x,y,w,h */
dst_r.x, dst_r.y + dst_r.height - 1,
dst_r.width, - (int) dst_r.height,
/* src x,y,w,h */
src_r.x, src_extents.height - src_r.y + 1,
src_r.width, - (int) src_r.height,
src_image->data,
&bi,
DIB_RGB_COLORS,
SRCCOPY))
https://bugs.freedesktop.org/show_bug.cgi?id=61876
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This was causing crashes due to double frees.
https://bugs.freedesktop.org/show_bug.cgi?id=62885
Signed-off-by: Benjamin Otte <otte@redhat.com>
|
|
http://lists.cairographics.org/archives/cairo/2013-March/024186.html
|
|
Reviewed-By: Benjamin Otte <otte@redhat.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
This gets rid of random noise that we got from the X11 server due to
uninitialized memory.
Fixes: pdf-surface-source, ps-surface-source, svg-surface-source
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
This fixes the following error:
./cairo-fixed-private.h: In function ‘_slow_segment_intersection’:
./cairo-fixed-private.h:374:9: error: ‘FALSE’ undeclared (first use in this function)
./cairo-fixed-private.h:374:9: note: each undeclared identifier is reported only once for each function it appears in
./cairo-fixed-private.h:386:12: error: ‘TRUE’ undeclared (first use in this function)
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
The test suite uses dots to separate the backend name from the content type.
Thus, the backend name must not contain any dots.
The xlib backend already calls its RENDER 0.0 target xlib-render-0_0 for this
reason. This commit makes the xcb backend match this.
Reported-by: Darxus <darxus@chaosreigns.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Before this, the following happened:
$ CAIRO_TEST_TARGET=image,xcb-render-0.0 make test
Cannot find target 'image'.
Known targets: image, [...]
The reason for this is that _cairo_boilerplate_target_matches_name() doesn't get
a null-terminated string, but instead has a pointer to the end of the string.
However, strpbrk() expects a null-terminated argument and thus could return a
result which points past the end of the input.
This commit fixes exactly this.
Reported-by: Darxus <darxus@chaosreigns.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
When comparing shader cache entries, it's important that we actually
compare the variable type hash.
|
|
Previously this test was working because we were not scaling bitmap
fonts. We do now, so adjust test.
|
|
Commit 781f253 adds a rule cairo-*.*.* to .gitignore in the root dir.
Unfortunately this matches several src/cairo-*.pc.in files in the
src directory.
The build system requires these files to be present, but the rule is
allowing them to be ignored. For example, when extracting a cgit
snapshot tarball and checking it into another git repository, these
files get left behind. Any accidental changes to these files will go
unnoticed by a 'git status' (possibly creating bad installs) and
any intentional changes could not be committed (git commit -a will
miss them, and every one will need to be forced). This is not really
desirable.
We don't want to unignore *.pc.in here since there are many, many
autogenerated files with this name, and the cairo-*.*.* rule is in
general quite useful and doesn't warrant modification (although it
could be made a little more specific), so we just make these 4 files
a special case and negate the match with full filenames in src/.
Signed-off-by: Matt Sealey <matt@genesi-usa.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
Ever since the test output was moved from test/ to test/output/, using
CAIRO_REF_DIR to make the test suite succeed no longer works. The test suite was
looking for the wrong file names.
This patch makes this work again. However, I am not sure that this really is the
correct fix. It just seems to work. :-)
Reported-by: Darxus <darxus@chaosreigns.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
fd_default_width and fd_nominal_width
are arrays of doubles not arrays of ints.
|
|
If we ask for a buddy that is outside of our allocation that is an
error that should not happen with a power-of-two allocated zone...
However, since it has been seen in the wild, we can safely return that
there is no buddy rather than die in a too-late assert.
Reported-by: Anton Eliasson <devel@antoneliasson.se>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Similar to b7bd5ae4f3da44131261711bb236cd7aa24a3ae3, but applied to the
fallback stroke shaper.
|
|
Fix the test case line-width-tolerance for the fallback stroke shaper.
Instead of drawing quads between spline points, draw triangle based on
the actual spline edges. This roughly follows the approach of the
tristrip and polygonal shapers.
|
|
Before the intersection code was not taking into account that both
quotients are required to be in the range (0,1) for the segments to
intersect or handling the case of negative numerators and denominators.
|
|
Previously _cairo_gl_composite_setup_vbo was overwriting the old context
vertex_size, while _cairo_gl_context_setup_operand was relying on it to
determine if the vertex size changed. Instead of a fragile ordering of
statements, pass whether the vertex size changed as an argument to enforce
the calling order via method parameters.
|
|
One quickly gets used to having stdbool.h available.
|
|
Similar to glx, add query for the EGLContext and EGLDisplay to egl-based
cairo devices.
|
|
Say, you have bitmap strikes for sizes 50ppem and 100ppem.
To render at 60ppem, it's much better to downscale the 100ppem
bitmap than upscale 50ppem one. Prefer downscaling.
|
|
Bug 61451
|
|
The 'count' parameter is an indication to libXrender of the number of
matches to skip before reporting (rather than a limit on the number to
report). As we only want the first match, always pass 0.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
https://bugs.launchpad.net/ubuntu/+source/libcairo/+bug/1051939
|
|
When querying whether the run is small enough to fit inside the
pre-allocated temporary buffer, we need to avoid comparing against
sizeof(buf) as buf is a variable length array and so sizeof() is
meaningless.
Reported-by: Edward Zimmermann <Edward.Zimmermann@cib.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Zozó Teki pointed out that we leak the fallback surface upon finish in
case it was active at the time as the preceding flush would only clear
the damage and not decouple the fallback surface.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
GL_DITHER is enabled by default by spec. Leaving GL_DITHER enabled
causes color pixel mismatch on some drivers by comparing uploading then
readPixels and original image.
|
|
|
|
The fast path for transforming a path by a simple scale factor, forgot
to fix up the orientation of the box if that scale factor was negative.
Reported-by: Edward Zimmermann <Edward.Zimmermann@cib.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we don't discard any elements, then the index array is simply a 1:1
mapping of the element array, and we may as well bypass it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Our userspace API mandates that surfaces created for the user are
cleared before they are returned. Make it so for the win32 similar image
constructor.
Reported-by: Michael Henning <drawoc@darkrefraction.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60519
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The elts offset is a delta from the previous glyph coordinate. So by
subtracting the dst origin everytime, we were accumulating a glyph
position error. Instead we just want to offset the starting coordinate
and then always use relative positions.
Reported-by: Theo Veenker <T.J.G.Veenker@uu.nl>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we only ignore the result of the computed boundary intersection,
because the edge is inside that boundary, then we can simply forgo the
calculation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we need to extrapolate the edge to the boundary, then we run the risk
of an overflow for an immaterial result. So if the edge does not cross
the boundary, we can simply use the corresponding end-point and not emit
the boundary segment.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60489
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add the cairo_private markup to hide the PLT entries and to keep make
check happy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
SOURCE operations with an opaque are equivalent to OVER.
This can prevent us from falling back in certain cases.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since the translation into a separate function, its condition was
reversed: that is almost everybody thought they were on a win98 machine
and so had no working AlphaBlend().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Based on an idea from Ravi Nanjundappa
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
There are some situations that the MSAA compositor doesn't support using
the CLEAR operator. We should properly fall back in those cases.
|
|
When using WinAnsiEncoding in PDF the glyphs are keyed by glyph
name. We need to ensure the correct names are used and can't assume
the glyph names in the font are correct.
Bug 60248
|
|
In normal cases, we want to flush pending operations reading from the
texture before modifying its contents. However during uploading of
glyphs into the glyph cache, we repeatedly modify the texture as we
construct the vbo (whilst referencing it for that operation). We track
unused areas in the glyph cache so that if we run out of space, we can
explicitly flush the pending glyphs and start afresh and avoid having to
flush the operation in common case.
|