| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
In order for custom context to automatically track when a pattern is
modify after being set on the context (and before it is used in an
operator), we need for there to be a callback when the pattern is
modified.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
Allow a backend to completely reimplement the Cairo API as it wants. The
goal is to pass operations to the native backends such as Quartz,
Direct2D, Qt, Skia, OpenVG with no overhead. And to permit complete
logging contexts, and whatever else the imagination holds. Perhaps to
experiment with double-paths?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
This is necessary as the callers do not propagate the clip extents after
finding the singular clip path. *sigh*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
_pixel_to_solid() used to assert that it got a known cairo_format_t.
However, this might not be the case when backends decide to use a pixman
format that is not representable by a cairo format (X and DirectFB are
examples for backends that do that).
This patch makes _pixel_to_solid() return NULL in that case and fixes
the callers to deal with it.
https://bugs.freedesktop.org/show_bug.cgi?id=37916
|
|
|
|
|
|
|
|
| |
Søren Sandmann Pedersen spotted that we had reversed the channel order
in the conversion back from the pixman format codes to
CAIRO_FORMAT_RGB30.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
This is a common format used by framebuffers to drive 10bpc displays
and is often hardware accelerated by XRender with underlying support
from pixman's x2r10g10b10 format (which provides coercion paths for
fallbacks).
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the new "operator-source" test and the original report from:
http://lists.cairographics.org/archives/cairo/2011-March/021827.html
I tested this code path with all operators and "source" is the only one which
causes issues with rendering outside of the boxes.
Possibly fixes: https://bugs.freedesktop.org/show_bug.cgi?id=35407
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
| |
gcc does not know thta num_glyph is guaranteed to be strictly
positive, so it complains that:
cairo-image-surface.c:3787: warning: ‘status’ may be used uninitialized in this function
|
|
|
|
| |
cairo-image-surface.c:101: warning: enumeration value ‘PIXMAN_x14r6g6b6’ not handled in switch
|
|
|
|
|
|
|
| |
If PIXMAN_HAS_ATOMIC_OPS, ix and iy will be changed if the source
surface is of subsurface type. They need to be reset to 0 before being
passed to _cairo_matrix_to_pixman_matrix_offset() or the acquired
surface will have an incorrect offset .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pixman_image_ref() and pixman_image_unref() functions
aren't threadsafe in current pixman, so we can't share
pixman images across contexts where they may end up
moving between threads. The main use of these functions
is in keeping a global cache of pixman_image_ts for
solid colours and reusing the same pixman_image_t for
patterns pointing to the same image data where possible.
This patch removes those uses from cairo by wrapping
them in a PIXMAN_HAS_ATOMIC_OPS conditional. There is
no automatic test this, so we will have to manually
turn this code back on when pixman does gain atomic
ops.
The only two remaining calls to pixman_image_ref() are
done on locally created images so they are safe.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=34177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We make the presumption that the incoming geometry is appropriately
clipped to the bounded extents and can simply memset without being out
of bounds.
However, this was not always the case as we were removing the clip boxes
in order to optimise the common case where the operation is naturally
limited to the surface.
(This is a candidate for 1.10)
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/710072
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
cairo_image_get_data() and other direct access functions are often
misused by applications because they don't call cairo_surface_flush()
and/or cairo_surface_mark_dirty() around the code which accesses the
surface data directly.
Although this information is already available in the description of
the cairo_surface_t type, adding a reminder about it in the direct
access functions should make it easier to use them correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The same code was duplicated (incorrectly and with some minor
differences) in pattern, image, xlib and xcb.
_cairo_gradient_pattern_max_val() abstracts that code in a function
that can be used whenever a gradients extremes need to be rescaled to
fit within a given range.
Fixes huge-linear, huge-radial.
Fixes part of https://bugs.freedesktop.org/show_bug.cgi?id=32215
|
|
|
|
|
|
|
|
|
|
|
| |
Xlib, XCB and image use the same code to convert a cairo_matrix_t to a
backend-specific transform.
The code did not handle correctly some matrices, thus a new function
that performs the conversion in a more generic way was added and used
in the backends instead of fixing the repeated code.
Fixes part of https://bugs.freedesktop.org/show_bug.cgi?id=32215
|
|
|
|
|
| |
Add an implementation of a fast and reasonably accurate
non-antialiased mesh gradient rasterizer.
|
|
|
|
|
|
|
| |
_cairo_polygon_limit() had to be called immediately after
_cairo_polygon_init() (or never at all).
Merging the two calls is a simple way to enforce this rule.
|
|
|
|
|
|
|
| |
An A1 image with full alpha should be opaque black, not opaque white.
Use specialized solid black image instead of the generic constructor
for an A8 image with full alpha (it is likely to be cached).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The input of _fill_unaligned_boxes is (supposed to be) composed only
of disjoint rectangles, that can safely be passed to the rectilinear
span converter, but this function artificially introduces intersecting
rectangles when drawing non-aligned boxes.
Using non-intersecting rectangles is easy and makes the code correct.
Fixes rectilinear-grid.
Reviewed-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recording surface source image painted onto fallback images always
had the resolution 72ppi instead of the fallback resolution of the
target surface. Fix this by passing adding a new
acquire_source_image_transformed backend function for the recording
surface to use and passing the target device transform through to the
recording surface when the image is acquired.
Based on Carl Worth's experimental acquired_source_image_transformed
branch.
https://bugs.freedesktop.org/show_bug.cgi?id=24692
|
|
|
|
|
|
|
| |
In 06e9caf86199e8261a07db6d4774628fa147728d the type of the variables
was changed, but the type used to compute the allocation size was not.
Fixes a crash in user-font-mask (test-fallback backend).
|
|
|
|
|
|
|
| |
Use inline accessors to hide the flags in the code.
This ensures that flags that need additional computations (example:
is_rectilinear for the fill case) are always used correctly.
|
|
|
|
|
|
|
| |
This fixes "text-rotate" in the test suite for the image backend and
"overlapping-glyphs" for the xcb backend.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
| |
Spotted by Uli Schlachter when I copied the image glyphs clipping to
xcb.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
Fixes test/a8-clear.
Reported-by: Jeremy Moles <jeremy@emperorlinux.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
cairo-image-surface.c: In function ‘_cairo_image_reset_static_data’:
cairo-image-surface.c:1006: warning: old-style function definition
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
| |
Image has static caches which needs to be reset to make
cairo_debug_reset_static_data behave as expected.
Silences a bunch of leak reports by check-valgrind.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
| |
|
|
|
|
|
| |
Fixes the regression in bitmap-font and large-font pointed out by Andrea
Canciani since ef067933.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is path is slightly peculiar in that it explicitly avoid the
intermediate mask and the geometry is not pre-clipped.
This in conjunction with the previous commit fixes:
Clip doesn't work for text
https://bugs.freedesktop.org/show_bug.cgi?id=29008
which is captured in test/partial-clip-text.
|
|
|
|
|
| |
This is required for handling glyphs when rendering directly to the
surface.
|
|
|
|
|
|
| |
I did this manually so I could review the docs at the same time.
If anyone finds typos or other mistakes I did, please complain to me (or
better: fix them).
|
|
|
|
|
|
|
|
| |
As we transform the array of trapezoids into an array of boxes in-place,
we must take local copies of the coordinates before writing into the
boxes otherwise we may inadvertently modify the trapezoidal coordinates.
Fixes test/a1-bug.
|
|
|
|
|
|
|
|
|
|
|
| |
When checking if the traps are equivalent to a set of rectangles, we
need to use the same rounding mode as when converting the traps to a set
of boxes and then filling them. Failure to do leads to a situation where
(-127,-128) was thought to be equivalent to (0,0) but we attempted to
fill from 0 to -1 instead.
References:
http://lists.cairographics.org/archives/cairo/2010-June/020115.html
|
|
|
|
|
|
|
|
| |
If we need to pattern requires component alpha, then we must take a
copy of the image and enable component alpha for pixman.
Fixes test/text-antialias-subpixel on xlib-fallback -- i.e. we will
finally render subpixel antialiased text on ancient XServers.
|
|
|
|
| |
Tested by zero-mask test.
|
|
|
|
| |
Lots upon lots of tiny fixes mixed in with experimental code. :(
|
|
|
|
|
| |
Apparently we can get to this point without evaluating the clip surface,
so return the error status rather than assert.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It is possible to encounter an allocation failure here since we may have
tweaked the clip since the last evaluation of the clip region.
|
| |
|
| |
|
|
|
|
|
| |
The optimization is done way smarter inside
_cairo_matrix_transform_bounding_box()
|
|
|
|
|
| |
This was most prominently shown by the a1-image-sample test, but
multiple tests exposed the problem with the xlib-fallback code.
|
| |
|
|
|
|
| |
Matches Pixman's output when going via pixman_rasterize_trapezoid()
|
|
|
|
| |
s/;;/;/ basically
|
|
|
|
| |
Fixes xlib fallback paths as exposed by the clip-push-group test.
|