| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
By this point we have already paid the penalty for acquiring the source
image, so kiss.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
| |
Remove all of the special casing and simply extract the source. The time
for special casing is to avoid calling the generic acquire in the first
place, so kiss.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
| |
In order to handle out-of-bounds sampling of a subsurface target we need
to first avoid incorrectly unwrapping it.
Fixes crash in subsurface-outside-target
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
| |
In order to keep the bookkeeping in order, and so prevent a later
assert, we need to clear any edges when swapping the active edge order
upon an intersection event. The active edges are then reconstructed.
Fixes evince http://www.horizonhobby.com/pdf/BLH3500-Manual_EN.pdf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
| |
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
Avoid the assertion failure of creating an error surface for an internal
status by handling the expected UNSUPPORTED condition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
This reverts commit 3a94f4c7091ea6262007e7960e4cd915e17b33c0.
We need to fallback to pushing large images over the wire if we exhaust
the SHM space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test failed with the following message:
cairo-surface.c:2265: _cairo_surface_create_in_error: Assertion `status <
CAIRO_STATUS_LAST_STATUS' failed.
_cairo_xcb_surface_create_shm_image() passed the error from
_cairo_xcb_connection_allocate_shm_info() to _create_in_error().
Fix this by never returning CAIRO_INT_STATUS_UNSUPPORTED from
_allocate_shm_info(). All other error cases in that function return
CAIRO_STATUS_NO_MEMORY, too.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cairo-xcb was deciding which type to cast a surface to based on its "type"
member. This is wrong, it should use "backend->type".
This bug was hit via xlib-xcb. This was painting a subsurface of a xlib-xcb
surface to an xcb surface. Because surface->type said "xlib", the code was
trying to check if the xcb surface had a fallback. However, this was done on the
subsurface. The end result was dereferencing a pointer to 0x28.
This was noticed while looking into
https://bugs.freedesktop.org/show_bug.cgi?id=42889
No test for this bug since I didn't manage to come up with one.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
| |
The output directory should be made before trying to open log files in
it.
Fixes the bug causing cairo-test-suite to log to stderr on the first
run (i.e. when test/output does not exist).
|
|
|
|
|
|
|
|
|
|
| |
Instead of embedding the pointer in the test structure, consistently
use the cairo_test_list_t structure for test lists.
This cleans up the code as the reverse-list operation can be reused.
Moreover this makes the code clearer, because each test list is now
independent and has no way to know about other test lists.
|
|
|
|
|
|
| |
The svg backend produces .svg files. Using the appropriate extension
allows the test suite to check the vector output in addition to the
PNG images.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it
@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }
|
|
|
|
| |
Don't open code xstrdup, just use it.
|
|
|
|
|
| |
cairo_test_log() can be implemented on top of cairo_test_logv() to
ensure that their behavior is consistent.
|
|
|
|
|
| |
The thread id is not used anymore (it is always == 0), so it can be
removed.
|
|
|
|
|
| |
The multi-threaded test path does not exist anymore and the ctx->thread
field is always 0, hence it can be removed.
|
|
|
|
| |
This code is unused and can be removed.
|
|
|
|
|
| |
The pass-through test was not updated to the current test conventions
and was not enabled in the Makefiles.
|
|
|
|
|
| |
Some utilities were providing incorrect or incomplete usage
information.
|
|
|
|
|
|
|
|
| |
Keep the option flags in alphabetical order. This makes it easier to
check for collisions or missing handlers.
Avoids an internal error when passing flags -c, -r or -v to
cairo-analyse-trace.
|
|
|
|
|
|
|
|
| |
cairo_boilerplate_open_any2ppm() returns a FILE* obtined from popen()
or fdopen(). It should hence be closed using pclose() or fclose()
respectively.
Fixes the crash on every script test on MacOS X.
|
|
|
|
|
|
|
| |
Silences a lot of warnings:
inlining failed in call to 'scan_read.part.9': call is unlikely and
code size would grow
|
| |
|
|
|
|
|
|
| |
The xml backend structure was being initialized with the wrong
functions, resulting in multiple "initialization from incompatible
pointer type" warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'make check' reports:
Checking that .libs/libcairo.so has the same symbol list as cairo.def
1a2,3
> _cairo_default_context_fini
> _cairo_default_context_init
Checking .libs/libcairo.so for local PLT entries
0011a274 00025f07 R_386_JUMP_SLOT 00026350 _cairo_default_context_fini
0011a494 00027607 R_386_JUMP_SLOT 00026480 _cairo_default_context_init
Marking these functions as cairo_private fixes the problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'make check' reports:
./cairo-cogl-context.c: * cairo_path_fixed_t in user coordinates that we can use to create a
./cairo-cogl-context.c: * We use this hash to lookup a cairo_cogl_path_meta_t struct which
./cairo-cogl-context.c: * need to use the cairo_path_fixed_t api to describe a rectangle in terms of
./cairo-cogl-context.c: * passed the current cairo_t context we don't have a good way
Error: some type names in the docs are not prefixed by hash sign,
neither are the only token in the doc line followed by colon.
Fix this by searching for the following regexp in the above files:
'^[^:]*:[/ ][*]\( .*[^#']\| \|^\)\<cairo[0-9a-z_]*_t\>\($\|[^:]$\|[^:].\)'
./cairo-cogl-context.c: * cairo_path_fixed_t in user coordinates that we can use to create a
./cairo-cogl-context.c: * We use this hash to lookup a cairo_cogl_path_meta_t struct which
./cairo-cogl-context.c: * need to use the cairo_path_fixed_t api to describe a rectangle in terms of
./cairo-cogl-context.c: * passed the current cairo_t context we don't have a good way
Error: some function names in the docs are not followed by parentheses.
Fix this by searching for the following regexp in the above files:
'^[^:]*:[/ ][*]\(\|[ ].*\)\([^#']\|^\)\<\(cairo_[][<>/0-9a-z_]*\>[^][<>(]\)'
Checking that source files #include "cairoint.h" first (or none)
cairo-cogl-context.c:#include "cairo-cogl-context-private.h"
These are fixed trivially by this patch.
|
|
|
|
|
|
|
|
|
| |
Add the missing includes, fix a typo and some changes in the
signatures of the backend functions.
The dest acquisition functions can be removed as they are not used
anymore in the new compositor architecture (this will probably cause
failures when fallbacks are tried because of unsupported operations).
|
|
|
|
|
|
|
| |
Add missing headers and fix some minor things (typos, missing
arguments, changed function name).
Map and unmap now rely on the generic path.
|
|
|
|
|
|
|
| |
The condition was comparing out with itself (always resulting in a
true result) instead of out and in.
Pointed out by Clang as "idempotent operation".
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 545f3085.. the cairo_spline_add_point_func_t type was modified to
accept the tangent in the point, but cairo-rectangle.c was not updated
accordingly.
Fixes:
cairo-rectangle.c: In function '_cairo_box_add_curve_to':
cairo-rectangle.c:297:11: warning: passing argument 1 of
'_cairo_spline_bound' from incompatible pointer type
|
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
When scissoring the compositing extents for windows, flip
the y coordinate as windows use a projection matrix that
does the same.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds a new GPU accelerated backend for Cairo based on the Cogl 3D
graphics API.
This backend aims to support Cairo in a way that translates as naturally
as possible to using a GPU, it does not strive to compete with the
anti-aliasing quality of the image backend if it can't be done
efficiently using the GPU - raw performance isn't the only metric of
concern, so is power usage.
As an overview of how the backend works:
- fills are handled by tessellating paths into triangles
- the backend has an extra fill_rectangle drawing operation so we have
a fast-path for drawing rectangles which are so common.
- strokes are also tessellated into triangles.
- stroke and fill tessellations are cached to avoid the cpu overhead
of tessellation and cost of upload given that its common for apps to
re-draw the same path multiple times. The tessellations can survive
translations and rotations increasing the probability that they can be
re-used.
- sources and masks are handled using multi-texturing.
- clipping is handled with a scissor and the stencil buffer which
we're careful to only update when they really change.
- linear gradients are rendered to a 1d texture using a triangle
strip + interpolating color attributes. All cairo extend modes
are handled by corresponding texture sampler wrap modes without
needing programmable fragment processing.
- antialiasing should be handled using Cogl's multisampling API
XXX: This is a work in progress!!
TODO:
- handle at least basic radial gradients (No need to handle full
pdf semantics, since css, svg and canvas only allow radial gradients
defined as one circle + a point that must lie within the first
circle.) - currently we fall back to pixman for radial gradients.
- support glyph rendering with a decent glyph cache design. The
current plan is a per scaled-font growable cache texture + a
scratch cache for one-shot/short-lived glyphs.
- decide how to handle npot textures when lacking hardware support.
Current plan is to add a transparent border to npot textures and use
CLAMP_TO_EDGE for the default EXTEND_NONE semantics. For anything else
we can allocate a shadow npot texture and scale the original to fit
that so we can map extend modes to texture sampler modes.
|
| | | |
|
| | | |
|
| |/
|/| |
|
| |
| |
| |
| | |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
| |
| |
| |
| | |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
| |
| |
| |
| |
| | |
The range of span's x coordinate is between xmin and xmax. So we
have to allocate the span array with size of xmax - xmin + 1.
|
| |
| |
| |
| |
| |
| | |
Add support for basic solid color strokes using the fixed path
stroke shaper. Currently components of the stroke overlap, but
that will be handled in the following patch.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds basic clipping to the OpenGL MSAA compositor via the
depth and stencil buffers. Stenciling and depth bits are
stored in a renderbuffer.
Note that we only attach renderbuffers to surfaces created by ourselves
and not for foreign drawables (e.g. X Windows).
|
| |
| |
| |
| |
| | |
Introduce the very basic functionality of an MSAA compositor
for OpenGL. For this first patch only solid fills are supported.
|
| |
| |
| |
| |
| | |
The MSAA compositor will composite OpenGL primitives directly and
anti-alias via the GPU.
|