Adds two new APIs to the composite API:
- _cairo_gl_composite_set_mask_spans()
Tells the composite renderer to use the color values for spans.
- _cairo_gl_composite_set_clip_region()
Tells the composite renderer to use GL_SCISSORS_TEST to clip when
drawing. This function is very unperformant, so if it can be avoided,
it probably shouldn't be used.
This is the first step at adding the following function set:
_cairo_gl_composite_begin()
_cairo_gl_composite_emit_*()
_cairo_gl_composite_end()
which will take care of proiding a unified model for emitting vertexes
using vbos instead of the 5 different methods we currently have.
This allows designing a cleaner interface for cairo_composite_t as there
will not be static functions that get called outside of the "published"
interfaces.
This allows to grow the complexity of the shaders without enlarging the
static array to unreasonable sizes.
The cache size of 64 is essentially random.
The idea is being able to generate shaders from the given input
on-demand. This allows creating more advanced shaders, such as those
that include the destination (for self-painting and
unsupported-by-blending operator) or painting images in weird formats
(extra translation step in shader, think YUV).
Previously the glyph advance in font units was used for the widths in
the PDF font dictionary. This only works for cff fonts that use a
[0.001 0 0 0.001 0 0] font matrix.
Previously the glyph advance in font units was used for the widths in
the PDF font dictionary. This only works for Type 1 fonts that use a
[0.001 0 0 0.001 0 0] font matrix.
https://bugs.freedesktop.org/show_bug.cgi?id=28061
Required for successful linking of our programs. I am not sure what the
impact this has upon other users of Cairo yet, I think we need to export
the PTHREAD_CFLAGS via cairo.pc as well.
Those paths were broken, as they didn't properly translate the polygon
to the destination size. And rather than adding lots of code that allows
translation, it's easier to just delete this code.
Note that the only user of the code was the GL backend anyway.
We get circular references that way.
If it turns out later such a cache is critical, we'll need to invent a
way to avoid circling references. For now, just pretend it's not
important.
Clarify that cairo_pattern_create_rgb() and cairo_pattern_create_rgba()
should be be overloaded as a single constructor for SolidPattern, but
instead should be static methods.
Hopefully reduce the occurrence of the confusion between the
premultiplied shorts in cairo_color_t and the non-premultiplied shorts
in cairo_color_stop_t.
The existence of the two separate types is debatable and open for
review.
color stops are not premultiplied so we need to handle them carefully
when comparing. The next step will be to make cairo_color_stop_t a
unique type to prevent this mistake again.
on src/cairo-composite-rectangles.c
The extent of the operation can be larger than the source if
the operator is not bounded by the source.
Fixes clip-unbounded, operator-source, surface-pattern-operator