Commit graph

10170 commits

Author SHA1 Message Date
Chris Wilson
58639857f9 script: Update mesh pattern for earlier change of csi operators
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 17:42:16 +00:00
Chris Wilson
1b1b1ecc6f traps-compositor: add a missing release()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 15:57:36 +00:00
Chris Wilson
e5cb567f5d xlib: Trim the ximage to match the trimming of the intermediate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 15:49:34 +00:00
Chris Wilson
1111cc50d3 xlib: Make the core compositor actually paint
It helps to actually set the fill colour when drawing...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 15:44:55 +00:00
Chris Wilson
5b107587e7 xlib: Correct the device-offset applied to the map-to-image result
A typo, a typo surely, to use extents->y twice instead of the more
normal x, y.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 15:13:26 +00:00
Chris Wilson
85110d9ce1 xlib: Trim the intermediate upload image to match the upload extents
Rather than transform the whole image, just convert the region of
interest.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 15:06:48 +00:00
Chris Wilson
89fddc38eb traps-compositor: Reduce a complex clip generation to an ADD operator
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 12:57:12 +00:00
Chris Wilson
9e640c7ae2 mask-compositor: Acquire the target surface when creating the composite mask
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 12:32:44 +00:00
Chris Wilson
605f23d155 xlib: Hook up copy_boxes for the mask compositor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 11:27:05 +00:00
Chris Wilson
6ab1deb5c6 boilerplate/xlib: Exercise the mask based compositor for xrender version 0.0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 11:24:14 +00:00
Chris Wilson
08de30d8b5 test: Add a set of reference images for the mask-based compositor
Serves as another reference for some xlib targets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:51:30 +00:00
Chris Wilson
3d499ea901 xlib: Replace obsolete disable-xrender with shiny new device debug interface
As prototyped with xcb.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:41:37 +00:00
Chris Wilson
73df8eb8db test/xlib: Remove stale reference images
We know have a swrast reference compositor for xlib (test-traps) and so
should not need these old xlib specific reference images.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:19:18 +00:00
Chris Wilson
b2132eed79 boilerplate/xlib: The xlib-fallback should be visually identical to image 2012-02-22 10:18:56 +00:00
Chris Wilson
cd4fd8a802 test: Update traps for changes in reference font 2012-02-22 10:11:16 +00:00
Chris Wilson
c9f18bb034 test: Update base reference images for new reference font
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:09:05 +00:00
Chris Wilson
da8841cc5e test/README: Update sha1sums for fonts used
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 09:30:32 +00:00
Chris Wilson
2d74eaf92f image: Add the get-font-options callback again.
In the midst of trying to simply export the
_cairo_image_surface_get_font_options() for subclassing, I accidentally
decoupled it from the image surface backend. Mea culpa.

Fixes regression from 8bea52bb (Add preliminary damage tracking), which
should not have even touched the backend structure except for an ugly
rebasing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-20 21:05:54 +00:00
Andrea Canciani
58f79a85b0 perf: Don't use a boolean value as integer
Although in this case the boolean values are guaranteed to be 1/0,
using them as true/false (in an if condition) seems much saner than
using them to limit the number of iterations on a for loop.

Fixes:

cairo-perf-micro.c:221:5: warning: cannot optimize possibly infinite
loops [-Wunsafe-loop-optimizations]
2012-02-20 12:32:54 +01:00
Andrea Canciani
86a7533d0a stroke-style: Silence gcc warning
and make it more obvious that we're not doing OOB accesses.

They were not possible because of the parity constraint, but by
guarding the highest index with which we access the data in the loop,
the correctness information is completely contained in the loop code.

Fixes:

cairo-stroke-style.c:199:2: warning: cannot optimize loop, the loop
counter may overflow [-Wunsafe-loop-optimizations]
2012-02-20 12:32:53 +01:00
Andrea Canciani
d3b6e151a2 path-fixed: Silence gcc warnings
_cairo_path_fixed_last_op() contains an assertion, which gcc doesn't
like to inline. Since it is a static function, which basically
accesses a value, gcc will inline it anyway when assertions are
disabled, so remove the "inline" hint to reduce gcc warning noise when
doing debug builds.

Fixes:

cairo-path-fixed.c: In function '_cairo_path_fixed_drop_line_to':
cairo-path-fixed.c:373:1: warning: inlining failed in call to
'_cairo_path_fixed_last_op.isra.5.part.6': call is unlikely and code
size would grow [-Winline]
cairo-path-fixed.c:400:1: warning: called from here [-Winline]
...
2012-02-20 12:32:53 +01:00
Chris Wilson
f4908b3848 test: Refresh reference images for antialiasing fix
Having discovered that I had recreated the references images with a
buggy rasteriser, we now need to recreate them with the correct reference
settings.
2012-02-20 11:24:17 +00:00
Adrian Johnson
01ea2d31cb type1-subset: ensure additional glyphs required by seac operator are parsed 2012-02-18 21:49:47 +10:30
Adrian Johnson
09b90611a1 type1-subset: some fonts have "noaccess put" instead of NP in the Subrs 2012-02-18 21:49:47 +10:30
Andrea Canciani
6a90b407aa build: Make 'all' the default target in the base Makefile.win32 build
Having the 'inform' target as default is misleading.
2012-02-18 08:55:59 +01:00
Andrea Canciani
93b0fcffc7 test: Create output directory even on Win32
This avoids cluttering the test directory with thousands of PNG files
and makes the behavior more consistent with other OSes.
2012-02-16 23:00:59 +01:00
Andrea Canciani
80c46d400b test: Fix any2ppm on MSVC
C99 initialization is not allowed.

Error macros are used even in the non-daemon version, hence errno.h
should always be included.

Fixes:

any2ppm.c(107) : error C2065: 'EINTR' : undeclared identifier
any2ppm.c(107) : error C2051: case expression not constant
any2ppm.c(108) : error C2065: 'EAGAIN' : undeclared identifier
any2ppm.c(108) : error C2051: case expression not constant
any2ppm.c(271) : error C2059: syntax error : '.'
2012-02-16 23:00:59 +01:00
Andrea Canciani
b2d978a815 test: Compile any2ppm on Windows
any2ppm is required in order to test the script backend.
2012-02-16 23:00:59 +01:00
Andrea Canciani
ed803a1935 build: Add 'clean' target to Makefile.win32 build system
The Makefile.win32 in the subdirectories provide a working 'clean'
target (defined in Makefile.win32.common), the central Makefile.win32
'clean' target does not do anything.

Replace the noop 'clean' target with one that cleans all the subdirs.
2012-02-16 23:00:46 +01:00
Andrea Canciani
c60627e8af device: Minor documentation fixes
Do not list CAIRO_DEVICE_TYPE_INVALID twice.

CAIRO_DEVICE_TYPE_WIN32 does not indicate that the type is cogl, but
win32.
2012-02-15 23:37:30 +01:00
Chris Wilson
83af31f0f3 win32: Cast the surface to an image-surface to find its parent (compile fix)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-15 19:48:07 +00:00
Chris Wilson
df608e0fab win32: Fix lifetime tracking of create_similar_image()
As we return the child image to the user and so perform the reference
tracking on it and not the parent win32 display surface, we need to add
a call to destroy the parent from the image surface. This of course
complicates the normal scenario of destroying the parent first, and so
in that case we need to unhook the image->parent before freeing the
surface->image.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-15 18:29:26 +00:00
Andrea Canciani
dfb8b131f5 win32: Fix Makefile.win32 build
The Makefile.win32 build system assumes that the files are in the same
directory level. If this is not the case, the compiler fails when it
tries to write the object files to a non-existing directory.

This can be fixed simply by making sure that the destination directory
always exists.

Fixes:

fatal error C1083: Cannot open compiler generated file:
'release/win32/cairo-win32-debug.obj': No such file or directory
2012-02-15 19:11:39 +01:00
Chris Wilson
ae3319890e win32: Rebase on the new compositor infrastructure
Try and undo all the damage that has acrued over the years by plugging
into the compositor pipeline.

References: https://bugs.freedesktop.org/show_bug.cgi?id=42739
References: https://bugs.freedesktop.org/show_bug.cgi?id=42821
References: https://bugs.freedesktop.org/show_bug.cgi?id=33081
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-15 14:37:11 +00:00
Chris Wilson
92c0b37d04 win32: Move to separate directoy
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>
2012-02-15 14:21:01 +00:00
Chris Wilson
8bea52bb0b Add preliminary damage tracking
This is initially based around the requirements for handling internal
fallbacks to the image compositor and reducing the number of pixels
required to be transferred.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-15 14:21:00 +00:00
Nis Martensen
c7d8ec72e6 doc: fix typo
The pattern creation function call in the example code has one _mesh too
much. This hopefully fixes the mesh mismatch mess :)

Signed-off-by: Nis Martensen <nis.martensen@web.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-14 21:04:25 +01:00
Oleg Romashin
4f81940749 qt: Fix compilation, also minor fix for building against Qt5
Update to latest surface backend structure, removed obsolete functions
and fixed functions API in order to be compatible with backend definition.

Fixed compilation with Qt5
2012-02-12 09:57:00 +00:00
Nis Martensen
76df401263 doc: Fix pattern name mismatch
In the example code, the mesh pattern variable was named "mesh" and
"pattern". Just use "pattern".

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
2012-02-12 09:07:48 +01:00
Andrea Canciani
469994ac19 observer: Silence gcc warning
GCC complains that:

cairo-surface-observer.c:289:26: warning: ignoring return value of
'cairo_device_acquire', declared with attribute warn_unused_result
[-Wunused-result]

Explain why it's safe to ignore it in a comment.
2012-02-11 15:10:22 +01:00
Andrea Canciani
f2567e95a1 observer: Return status when printing the observed data
Making cairo_surface_observer_print() and
cairo_device_observer_print() return the status of the observer or of
the stream makes it possible to correctly track what kind of error
happens if the print is not successful.

This makes the functions more consistent with existing API with a
similar signature like cairo_surface_write_to_png_stream().
2012-02-11 15:10:22 +01:00
Uli Schlachter
f7eaf37f04 Wrapper: Don't translate clips extents' origin
If a bounded recording surface doesn't have its extents .x and .y at the
surface's origin, this code was translating all clips to make up for that.
However, the clip already is in device space.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41583

Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-10 18:00:01 +01:00
Uli Schlachter
2f4645db84 xlib-xcb: Make this compile again
There was a typo in commit 2061cd81f2.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-10 17:52:45 +01:00
Chris Wilson
154e6b052b quartz: Add missing source hook
Regression from 2061cd81f2.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45866
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-10 09:21:32 +00:00
Chris Wilson
8960a5d0d0 analysis: replace open-coded _cairo_box_add_box()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-10 00:03:51 +00:00
Henry (Yu) Song
e809cea6d0 gl: initialize temporary surface with size same as subsurface
Rather than the operation extents which may be larger. It would be
beneficial to trim to the intersection instead and tweak the pattern
matrices - however this is the fallback path and so hopefully less
frequently trod!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 23:38:37 +00:00
Chris Wilson
38bf7a6526 gl: Transfer ownership of trapezoid mask to operand
Signed-off-by: Henry (Yu) Song <hsong@sisa.samsung.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 23:26:14 +00:00
Chris Wilson
2886df60b0 polygon-intersection: The edge direction is immaterial
When checking for continuations on the right-hand edge, the actual
direction of the edge is immaterial as it is sorted into ascending
y-order and the direction is fixed up when emitting into the output
polygon.

Fixes assertion introduced with 658fa75a5c.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 22:44:47 +00:00
Chris Wilson
bb86e332da traps: composite_boxes() is not a mask constructor
Since it doesn't combine the clip in a single pass, don't claim to.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 22:11:24 +00:00
Chris Wilson
3443ad903d spans: Pass unbounded operations to the spans compositors
Only bail if we need to combine clipping with the spans (either for a
bounded or unbounded operation).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 22:08:41 +00:00