Age | Commit message (Collapse) | Author | Files | Lines |
|
I suspect I may split the win32 code into a few more files, so move it
to its own directory to reduce the clutter.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
to allow querying if a surface supports a particular mime type.
|
|
First step: just make it compile again but crash upon usage.
|
|
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. :)
|
|
cairo-image-surface-private.h is needed in order to access
cairo_image_surface_t fields.
Fixes multiple build errors:
error C2037: left of '...' specifies undefined struct/union
'_cairo_image_surface'
|
|
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it
@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }
|
|
Silences some compiler warnings.
|
|
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>
|
|
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>
|
|
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>
|
|
The gtk-doc comments contain some typos and are missing some escaping.
|
|
Using double precision for gradient extreme objects ensures that they
are preserved as specified when constructing the gradient pattern.
Fixes huge-linear, huge-radial.
Fixes part of https://bugs.freedesktop.org/show_bug.cgi?id=32215
|
|
Add the mesh pattern type and an error status to be used to report an
incorrect construction of the pattern.
Update the backends to make them ready to handle the new pattern type,
even if it cannot be created yet.
|
|
Path are always interpreted in forward direction, so the ability of
interpreting in the opposite direction (which is very unlikely to be
useful at all) can be removed.
|
|
One of the problems identified in
https://bugzilla.mozilla.org/show_bug.cgi?id=454532 is that there are
some older printer drivers that do not work with ExtTextOut and the
ETO_GLYPH_INDEX option.
Fix this by where possible mapping glyph indices back to unicode and
calling ExtTextOut without ETO_GLYPH_INDEX. Glyphs that can not be
mapped back to unicode are printed with ETO_GLYPH_INDEX.
|
|
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>
|
|
What we want to use is size_t, but we don't want the implied POSIX
dependency. However, POSIX does say that size_t is an unsigned integer
that is no longer than a long, so it would appear safe to use an
unsigned long as a replacement. Safer at least than unsigned int.
|
|
|
|
Missing arg for _cairo_recording_surface_replay_region().
|
|
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
|
|
_cairo_pattern_is_opaque() now takes the extents over which the
operation is defined so that we make exclude the clear pixels that
surround EXTEND_NONE surfaces when determining opacity. In order to take
full advantage of this we need to start performing an extents query on
the operation and pass that down to the analysis...
This patch however is just the quick compile fix to pass a NULL and
restore the old behaviour.
Fixes (with previous commit):
Bug 26197 - Cairo doesn't build on windows
http://bugs.freedesktop.org/show_bug.cgi?id=26197
|
|
By preallocating in our data segment a couple of solid patterns for the
stock colours, it becomes more convenient when using those in surface
operations, such as when clearing.
|
|
The device is a generic method for accessing the underlying interface
with the native graphics subsystem, typically the X connection or
perhaps the GL context. By exposing a cairo_device_t on a surface and
its various methods we enable finer control over interoperability with
external interactions of the device by applications. The use case in
mind is, for example, a multi-threaded gstreamer which needs to serialise
its own direct access to the device along with Cairo's across many
threads.
Secondly, the cairo_device_t is a unifying API for the mismash of
backend specific methods for controlling creation of surfaces with
explicit devices and a convenient hook for debugging and introspection.
The principal components of the API are the memory management of:
cairo_device_reference(),
cairo_device_finish() and
cairo_device_destroy();
along with a pair of routines for serialising interaction:
cairo_device_acquire() and
cairo_device_release()
and a method to flush any outstanding accesses:
cairo_device_flush().
The device for a particular surface may be retrieved using:
cairo_surface_get_device().
The device returned is owned by the surface.
|
|
As a simple step to ensure that we do not inadvertently modify (or at least
generate compiler warns if we try) user data, mark the incoming style
and matrices as constant.
|
|
A pending commit will want to include some utility code from cairo and
so we need to extricate the error handling from the PLT symbol hiding.
|
|
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:
http://lists.cairographics.org/archives/cairo/2009-July/017571.html
|
|
it was wrapping code required for non windows fonts.
|
|
|
|
To better support creating EMF files with the win32-printing surface,
allow a GDI CTM with scale < 1 to be used.
http://lists.cairographics.org/archives/cairo/2009-September/018110.html
|
|
|
|
The win32 backend handles surface sources directly and never calls
_cairo_pattern_acquire_surface() which is the only other possible user of
clone_similar().
|
|
Innocuous warnings about the use of mismatching explicit casts (I'm really
not convinced by the merits of this particular compiler warning, but it
does cleanse the code slightly.)
|
|
Handling clip as part of the surface state, as opposed to being part of
the operation state, is cumbersome and a hindrance to providing true proxy
surface support. For example, the clip must be copied from the surface
onto the fallback image, but this was forgotten causing undue hassle in
each backend. Another example is the contortion the meta surface
endures to ensure the clip is correctly recorded. By contrast passing the
clip along with the operation is quite simple and enables us to write
generic handlers for providing surface wrappers. (And in the future, we
should be able to write more esoteric wrappers, e.g. automatic 2x FSAA,
trivially.)
In brief, instead of the surface automatically applying the clip before
calling the backend, the backend can call into a generic helper to apply
clipping. For raster surfaces, clip regions are handled automatically as
part of the composite interface. For vector surfaces, a clip helper is
introduced to replay and callback into an intersect_clip_path() function
as necessary.
Whilst this is not primarily a performance related change (the change
should just move the computation of the clip from the moment it is applied
by the user to the moment it is required by the backend), it is important
to track any potential regression:
ppc:
Speedups
========
image-rgba evolution-20090607-0 1026085.22 0.18% -> 672972.07 0.77%: 1.52x speedup
▌
image-rgba evolution-20090618-0 680579.98 0.12% -> 573237.66 0.16%: 1.19x speedup
▎
image-rgba swfdec-fill-rate-4xaa-0 460296.92 0.36% -> 407464.63 0.42%: 1.13x speedup
▏
image-rgba swfdec-fill-rate-2xaa-0 128431.95 0.47% -> 115051.86 0.42%: 1.12x speedup
▏
Slowdowns
=========
image-rgba firefox-periodic-table-0 56837.61 0.78% -> 66055.17 3.20%: 1.09x slowdown
▏
|
|
The meta-surface is a vital tool to record a trace of drawing commands
in-memory. As such it is used throughout cairo.
The value of such a surface is immediately obvious and should be
applicable for many applications. The first such case is by
cairo-test-trace which wants to record the entire graph of drawing commands
that affect a surface in the event of a failure.
|
|
Bug 19251: --enable-win32=yes and --enable-win32-font=no causes
compilation failure
[https://bugs.freedesktop.org/show_bug.cgi?id=19251]
Wrap use of the win32 font backend within win32-printing-surface within
CAIRO_HAS_WIN32_FONT ifdefs to prevent compilation failure if the user
explicitly disables the win32 font backend.
|
|
Correct function name in error string.
|
|
Use const to document the read-only nature of the arguments passed to the
callbacks.
|
|
A surface will have the chance to use span rendering at cairo_fill()
time by creating a renderer for a specific combination of
pattern/dst/op before the path is scan converted. The protocol is to
first call check_span_renderer() to see if the surface wants to render
with spans and then later call create_span_renderer() to create the
renderer for real once the extents of the path are known.
No backends have an implementation yet.
|
|
|
|
Other image formats will be added to the same file.
|
|
|
|
Update the show_glyphs() prototype to include the extents argument.
|
|
Add a "cairo_rectangle_int_t *extents" argument to to the following
backend functions:
paint
mask,
stroke
fill
show_glyphs
show_text_glyphs
This will be used to pass the extents of each operation computed by
the analysis surface to the backend. This is required for implementing
EXTEND_PAD.
|
|
Only copy the pattern if we need to modify it, e.g. preserve a copy in a
snapshot or a soft-mask, or to modify the matrix. Otherwise we can
continue to use the original pattern and mark it as const in order to
generate compiler warnings if we do attempt to write to it.
|
|
Missed updating win32 when implementing the new paginated API to query
support for the fine-grained fallbacks.
(Thanks to Adrian for spotting this oversight.)
|
|
Remove instances (abuses) of calling _cairo_pattern_acquire_surface() on
a known-surface-pattern with a hack to say "give me the entire surface".
If you know you just want the entire surface as an image surface, that
can be done more simply.
(Split from original patch on
https://bugs.freedesktop.org/attachment.cgi?id=15703, by Chris Wilson -
as usual all bugs are his.)
|
|
Using glyph indices with Type 1 fonts on a printer DC does not work.
Previously there was a temporary fix where Type 1 fonts were printed
as filled paths.
Now that _cairo_scaled_font_subsets_map_glyph() provides the reverse
mapping of the glyph index fix this by converting the glyph indices
back to the unicode values when printing Type 1 fonts.
|
|
Instead of allocating the union of all possible pattern types, just
allocate the specific pattern as used by the function in order to trim
the stack space consumption and flag potential misuse.
|
|
|