This reduces the CPU work in translating fixed function state to
shaders, but currently is a slight cost on GM45 because we end up
changing shaders more frequently since other parts of the pipeline are
doing fixed function still.
Adds cairo_gl_shader_program_t, and functions to manipulate same. Multiple GL
entry points for shaders are provided -- one for the pre-GL 2.0 extenstions
entry points, and one for GL 2.0. This code is well tested, but currently
unused in the GL backend.
_cairo_quartz_surface_paint will never fail as it falls back to image
when CoreGraphics can't handle the requested operation. This means that
upon fallback the ClipImage set by the masking code gets ignored, thus
the mask fallback path is broken. Using the _cg function ensures that
masking is either completely done by CoreGraphics, or the fallback path
passes the mask operation to image.
The fallback path shouldn't be used anymore, thus fallbacks are now
handled by passing unsupported ops to the image backend.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Another bug identified by Jeff Muizelaar was that the bounds for a
zero-length (i.e. it started and stopped at the same point) were
miscomputed. This test case exercises that bug.
Note: I believe the output is wrong here when padding a zero-length
gradient. On the left it should be red, and on the right it should be
blue.
Fixes test/clip-empty-save.
The all-clipped flag was not being copied to the new clip, which occurs
for instance when an empty clip is pushed via a gstate save.
Jeff Muizelaar found a bug in _cairo_clip_init_copy() which was not
correctly propagating the all-clipped status when an empty clip was
saved in the gstate. This test case exercises that bug.
This reverts commit 26e9f14906 on
cairo-path-stroke.
The changes in cairo-path-stroke are not needed anymore since dash
pattern approximation is now done in gstate before passing the dash
pattern to the backend.
Since approximation is only done when the pattern is sub-tolerance,
it is acceptable to apply it even for vector backends.
By doing it once and for all backends, backends are guaranteed to have
non-degenerate input.
Acked-by: Adrian Johnson <ajohnson@redneon.com>
Dash pattern approximation was taking the caps style into account
only for coverage computation, but not when computing the new
pattern, thus the computed approximation had a higher coverage if
the caps style was SQUARE or ROUND.
Reviewed-by: M. Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Comment on how the round caps coverage has been computed, explaining
the complete procedure. The comments doesn't contain intermediate
(verbose and ugly) results, but when executed in a symbolic math
program (sage, for example) computes the expected results.
Reviewed-by: M. Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Autoconf was complaining that AC_COMPILE_IFELSE and AC_RUN_IFELSE
were called before AC_GNU_SOURCE. Moving AC_GNU_SOURCE right after
AC_INIT solves this.
Hi,
while browsing the git log I've noticed a small mistake in the above
commit, where we reversed the order of init/fini required to reset the
mime-data array.
If the surface was written to using a fallback, and so is mapped, we
need to flush those modifications by relinquishing the map. So the next
time the application tries to write to the surface, those writes are
correctly serialised with our reads.
Check through error paths to catch a few more places where the mapped bo
may have been leaked, and add an assert to abort in case we do leak a
mapping.
As uploading to a tiled buffer is much slower than linear memory, don't
unless we expect to reuse the texture. This is not true for sub-image
clones, which are single shot affairs.
drm makes use of 64bit offsets when mmaping, and so we require the
64bit file interfaces. I had presumed that it would be pulled in with
AC_GNU_SOURCE, but no.