I need to remember that the translation for the pattern matrix is the
inverse of the translation for drawing.
Fixes: subsurface-modify-parent
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than store a command to copy from a reference of another recording
surface onto this, just replay the other recording surface.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Borrow the technique for installing a proxy-snapshot developed for
acquiring the image from a recording surface.
This prevents the cairo from exploding and using up all memory due to
infinite recursion, but it does break a few tests that perform
self-copies with differing transformations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I forgot that creating any image by defaults results in pixman
calloc'ing the pixel data and so cairo helpfully sets the is-clear flag
on the surface.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than compress the copies into a clip + copy, iterate over and
perform each copy separately so as to avoid the confusion for
window-to-window copies and the solitary GC->pCompositeClip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the environment variable ANY2PPM is set, use it as the path to the
any2ppm program. Otherwise, default to "./any2ppm" as before.
This makes it possible to set the ANY2PPM variable in the
Makefile.win32 build system, which makes it possible to use the "test"
target on the script backend.
As _cairo_surface_get_source() returns the limits of the source, a chunk
of code to query the source extents became redundant.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>
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>
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]
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]
_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]
...
Having discovered that I had recreated the references images with a
buggy rasteriser, we now need to recreate them with the correct reference
settings.
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 : '.'
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.
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>
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
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>
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>
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>
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