Age | Commit message (Collapse) | Author | Files | Lines |
|
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
|
|
Fixes record-* after the recent overhaul.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fixes 'xlib-expose-event' but triggers an infinite loop in self-copy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
Printing PDFs with large monochrome or grayscale images would result
in the images being blown up to 24-bit color images. Some printers are
very slow to print huge color images.
|
|
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The clip surface is no longer cached on the clip and the caller is
responsible for destroying it after use.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For an unbounded surface we cannot assume (0, 0, surface_width,
surface_height) as that is wrong and causes the operation to appear
clipped.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
A common requirement is the fast upload of pixel data. In order to
allocate the most appropriate image buffer, we need knowledge of the
destination. The most obvious example is that we could use a
shared-memory region for the image to avoid the transfer cost of
uploading the pixels to the X server. Similarly, gl, win32, quartz...
The other side of the equation is that for manual modification of a
remote surface, it would be more efficient if we can create a similar
image to reduce the transfer costs. This strategy is already followed
for the destination fallbacks and this merely exposes the same
capability for the application fallbacks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Explicitly convert the clearing of the unbounded area.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the simple condition where the user is applying an opacity mask to a
misaligned rectangle, we can treat it as a series of simpler composites
by combining the opacity with the coverage of the box.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
백현기 reported a use-case where he was recording an entire web-page
onto the recording surface, in order to facilitate panning. In this
scenario, where there may be lots of similar surfaces within the
recording we generate thousands of unused snapshot-images bloating
memory usage and impairing performance.
Under the right conditions we can replay directly onto the destination
which not only bypasses the snapshots but also skips the following
resampling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Step 1, fix the failings sighted recently by tracking clip-boxes as an
explicit property of the clipping and of composition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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).
|