Every time we run ./autogen.sh, the INSTALL file would be replace by
/usr/share/automake-1.11/INSTALL, which changes the file. This is very
annoying since it messes up the result of 'git diff' and git always
wants to commit it.
Declare it as foreign would fix this annoying issue. Since it's not a
GNU project, it makes sense to do so.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Use _cairo_gl_operand_copy to do the operand copy instead of by
something like *operand = surface->operand.
This would fix a crash introduced by operator-source test case, which
forgot to do reference while copying operand but did dereference while
destroying surface at combine_clip_as_traps().
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
[ickle: drop the extra reference for the owned surface]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
and reuse it to implement acquire_source.
Fixes
cairo-quartz-surface.c: In function '_cairo_quartz_surface_map_to_image':
cairo-quartz-surface.c:1568: warning: return from incompatible pointer type
cairo-quartz-surface.c:1576: warning: return from incompatible pointer type
In many places Cairo maps/unmaps surfaces to perform operations on the
raw image, but it doesn't care about the format being invalid. All of
these are appropriate users of _cairo_surface_map_to_image().
Cairo backends often need to map/unmap to a raster surface but they
don't care about the pixel format, as Pixman will be doing the format
handling.
Cairo users cannot know how to access the raw data if the format is
invalid.
The two different scenarios call for different guarantees on the
returned surface.
The private map/unmap functions also makes it possible to simply
return the status upon unmapping.
The existing INSTALL file is currently being replaced at every
autogen.sh run with the default one.
This is not desired, because INSTALL contains some cairo-specific
information.
The autogen.sh script fails if it cannot run gtkdocize. The absence of
this command should not cause cairo builds to fail, it should only
prevent the build of its documentation.
Fixes:
*** No GTK-Doc found, please install it ***
on systems without gtkdoc tools.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50356
Jesse complained that --enable-gl --enable-glesv2 wasn't pulling in the
right headers, and in particular GL_STENCIL8_DEPTH24_OES was undefined
but being used. In this case we can simply use the identical
GL_STENCIL8_DEPTH24 instead.
Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Whilst generating a glyph run from a string, any glyphs that are far
outside the surface (including a substantial guard region) are culled.
This affects the path extents. Workaround this by increasing the surface
size.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Apparently this too suffered from bug-bo-collins and is fixed by
(bo-rectangular: Emit subsummed boxes for overlapping edges).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Some drivers have terrible latency issues when using VBO and for our
dynamic use-case (we never reuse a VBO currently) there is little
benefit from using a VBO and often a loss of performance from doing so.
And there is the benefit from reducing the number of our own code paths.
==12598== 1,344 (768 direct, 576 indirect) bytes in 2 blocks are
definitely lost in loss record 512 of 519
==12598== at 0x402894D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12598== by 0x4C76501: _cairo_image_surface_create_for_pixman_image (cairo-image-surface.c:176)
==12598== by 0x4C76953: _cairo_image_surface_create_with_pixman_format (cairo-image-surface.c:345)
==12598== by 0x44CFAC: draw (xcb-snapshot-assert.c:36)
==12598== by 0x40E14C: cairo_test_for_target (cairo-test.c:923)
==12598== by 0x40EEA7: _cairo_test_context_run_for_target (cairo-test.c:1545)
==12598== by 0x40BD53: main (cairo-test-runner.c:254)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Without uint64_t we need to construct a cairo_int64_t from the struct of
smaller 32-bit types rather than just casting the larger 64-bit value.
Reported-by: Hakki Dogusan <dogusanh@tr.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rename should_fall_back to can_use_msaa_compositor to make it
more comprehensible and also modify the logic to fall back
when the antialias mode is not "fast" or "default."
Instead of conservatively flushing after every single drawing
operation. Wait until we are certain we need to flush, which
in the case of the MSAA compositor is when we start compositing
with a different type of geometry.
Instead of falling back to the traps compositor to do glyph
rendering, handle it in the MSAA compositor. This allows using
the stencil buffer or scissor to clip and simplifies the MSAA
code path.
The MSAA compositors clips in a unique way We'd like to
share this method with the text rendering path, so we move
it to cairo-gl-composite so that it works in a way very
similar to clipping with the spans and traps compositors.
Instead of falling back to the spans compositor, let the msaa
compositor handle painting. This ensure clipping is handled
in a consistent way with the rest of the msaa compositor.
This implementation is not very efficient at the moment and does not
work with platforms using the incompatible IMG extension (mobile
GPUs). Performance improvements and mobile GPU support will follow.
If the join indicates the pair of edges are parallel, we may be
considering the final segment of the spline with a different tangent
vector than the slope of the final edge and so lead to false dropping of
an edge. This has the effect that the line segments between 'arc arc arc
arc' (a rounded rectangle) are no longer horizontal or vertical. As path
construction tries to eliminate joins between colinear segments, this
optimisation should not be required anyway.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Eliminate numerical inaccuracy from accumulating angle through
the floating point step value by using the exact end-value for the last
arc segment.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In OpenGL ES 2.0, repeat wrap modes (GL_REPEAT and GL_MIRRORED REPEAT) are
only available for NPOT textures if the GL_OES_texture_npot is supported.
This commit adds a shader implementation of these wrap modes for use by
devices that do not support GL_OES_texture_npot.
As we convert the unaligned clip boxes to a region, we need to process
the intersection of the boxes with the clip surface as a separate step.
Fixes tighten-box for the base compositor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>