summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-08-15test: Refer to output filename by variable, not a hardcoded valuetest-outputs-to-output-dirBryce Harrington1-2/+6
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-15test: Ensure output dirs exist, falling back to current dir if neededBryce Harrington1-19/+1
This change makes several tests behave more like ps-eps.c, et al by making them attempt to mkdir "output", and in case of trouble use "." instead. filenames are now allocated at runtime due to this change, so ensure the corresponding free()'s are in place as well. This should facilitate running the test suite with a relative path outside cairo's source tree, such as when employing the CAIRO_REF_DIR environment variable. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-15test: Make cairo_test_mkdir() usable throughout testsBryce Harrington2-0/+22
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-15test: concat CAIRO_TEST_OUTPUT_DIR at point of use instead of BASENAMEBryce Harrington11-28/+28
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-15test: Use CAIRO_TEST_OUTPUT_DIR for name of the output directoryBryce Harrington11-11/+11
Thanks to Uli Schlachter for the suggestion Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-15test: Fix several tests to place output files in the output directoryBryce Harrington11-15/+28
The standard location for test output is cairo/test/output. The harness itself was updated to write automatically generated images in this directory, however a number of tests generate their own local output files. This patch updates these tests to write their output into cairo/test/output as well, in the interest of decluttering the test directory. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-15test: Don't ignore test output files left in test directoryBryce Harrington1-4/+0
Tests should be placing output files in the output/ directory now, although not all tests follow this standard practice. Drop the "*.out.*" from .gitignore to make improper test behavior more evident. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-13surface_get_extents: Reject finished or error surfaceUli Schlachter1-0/+12
This fixes a crash in the api-special-cases with xlib-xcb when calling cairo_clip_extents() on a context that refers to a finished surface. The crash was a simple NULL pointer dereference, because the underlying xcb surface that was used in xlib-xcb was gone and set to NULL already. Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-13push_group: Refuse working with unusable surfaceUli Schlachter1-0/+5
Make cairo_push_group() fail when the context's target surface is finished. This fixes the api-special-cases for the xcb backend: Detected error during xcb run: error=9, seqno=0x13c, major=53, minor=0 The problem was that the Pixmap for the cairo surface was already freed and cairo still tried to use it again as the drawable in a CreatePixmap request. Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-13surface: Error out on finished surfacesUli Schlachter1-0/+19
Finished surfaces and surfaces with an error status must not be usable anymore, so refuse to work on them. This improves the result for api-special-cases. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68014 Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-13api-special-cases: Also test contextsUli Schlachter1-21/+1153
This adds code to the api-special-cases test which also tests the behavior of cairo when the cairo context or the surface that is target is in an error state or finished. These new tests call into all public entry points defined in cairo.h which receive a cairo_t * as their first argument. Currently this causes a new crash in the testsuite: cairo-surface.c:394: _cairo_surface_begin_modification: Assertion `! surface->finished' failed. Reported-by: christophe.troestler@umons.ac.be References: https://bugs.freedesktop.org/show_bug.cgi?id=68014 Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-11perf: Move macro-benchmark documentation to cairo-tracesBryce W. Harrington1-69/+20
The macro benchmarks were moved to a separate repository some time ago, but the perf README still refers to these tests as if they were still present, which may lead to some confusion. Instead, consolodate the macro benchmark documentation with the macro benchmarks, and focus this README on just the (still in tree) micro-benchmarks. Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-11HACKING: Make mention of the separate cairo-traces repoBryce W. Harrington1-4/+5
Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-04[ft] Ensure alignment of bitmaps received from FreeTypeBehdad Esfahbod1-0/+9
2013-08-04[ft] Fix alignmentBehdad Esfahbod1-6/+3
2013-07-29Revert accidentally committed stuffBehdad Esfahbod1-3/+3
2013-07-29[ft] Add missing includeBehdad Esfahbod2-3/+4
2013-07-29[ft] Fix mathBehdad Esfahbod1-7/+2
2013-07-29Support 2bit and 4bit embedded bitmapsBehdad Esfahbod1-1/+51
2013-07-28type1-subset: Don't try to rename non winansi glyphsAdrian Johnson1-2/+10
When the latin subset contains glyphs that use the seac operator to combine two glyphs, additional non winansi glyphs are added to the subset. These extra glyphs do not have a winansi name so they can't be renamed. Based on a patch by Salvador Ortiz. Bug 67324
2013-07-15gl/msaa: Always use scissor when clippingHenry Song1-5/+5
Even when using the stencil buffer for clipping, always scissor the clip extents. This simplifies the code a bit.
2013-07-15gl/msaa: Disable stencil and scissor during framebuffer blitHenry Song1-0/+28
When blitting the framebuffer during transitions to and from multi-sampling mode, we need to disable the stencil and scissor test so that the entire surface is preserved. This fixes the bitmap-font test for the MSAA compositor.
2013-07-15gl/msaa: Properly destroy stencil buffer clip cacheHenry Song2-1/+6
When replacing the stencil buffer clip cache or destroying a surface, destroy the cached clip. This prevents the clip from leaking.
2013-07-05Towards support loading color glyphs from FreeTypeBehdad Esfahbod1-3/+38
See comments.
2013-07-05[ft] Fix wrong assumptionsBehdad Esfahbod1-7/+3
If subpixel rendering is enabled, but FT returns a 8bit gray bitmap (perhaps because the font has 8bit embedded bitmaps) we were hitting the assertions because the assumptions made were wrong. Fix up.
2013-07-05[ft] Fix memory bug in copying bitmapsBehdad Esfahbod1-3/+1
2013-07-04xcb: Fix some uninitialized variable warningsUli Schlachter1-3/+3
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-07-04image compositor: Always finish the span rendererUli Schlachter1-3/+4
In some obscure conditions that I don't really understand, the image compositor did not finish a span renderer that it created. This could then cause the last row of the span to be ignored. Fixes: clip-complex-bug61492 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61592 Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-07-04Add new test for bug 61592Uli Schlachter3-1/+62
This test exercises some clipping-related failure that Seongwon Cho reported. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61592 Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-07-04Fix caps-tails-curve reference imagesUli Schlachter3-0/+0
Commit d7f5a1bec fixed a bug. This caused 12 new test failures for the test-traps test target: caps-tails-curve degenerate-arc degenerate-path joins subsurface subsurface-scale twin twin-antialias-gray twin-antialias-mixed twin-antialias-none twin-antialias-subpixel user-font Most of these are indeed (new?) bugs. However, caps-tails-curve actually started producing the expected result and the reference image just wrongly captures the old state of things. At the time of that commit, just taking the output from test-traps as the new reference image works fine for all backends. However, with current git, something introduced more antialiasing noise and now test-traps changed again while cairo-xcb stayed with the old result. Thus, we also need a new reference image to fix this test. (The wrong reference images come from commit 8488ae02 which turned test-traps' results into reference images) Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-07-04test: Amend check-refs.sh to support out-of-tree buildsChris Wilson2-17/+6
2013-07-04test: Remove conflicting .ref.png, .argb32.ref.png, .rgb24.ref.pngChris Wilson157-0/+0
Where a content specific reference image exists, prefer to have both content reference images (i.e. both argb32.ref and rgb24.ref) rather than a mix of .ref and argb32/rgb24.
2013-07-04test: Add a few reference images found lurking on my machineChris Wilson4-0/+0
2013-07-04test: Remove all identical (cmp & pdiff) reference imagesChris Wilson1477-0/+0
Courtesy of the improved check-ref-dups written by Bryce Harrington: Running make check on the codebase (with default configuration) with the redundant images removed produces essentially the same test results: Before ------ Tests run: 13687 Passed: 9216 Failed: 3566 Expected Failed: 312 Error: 1 Crashed: 17 Untested: 575 Total: 13687 After ----- Tests run: 13689 Passed: 9216 Failed: 3566 Expected Failed: 312 Error: 1 Crashed: 19 Untested: 575 Total: 13689 (with the exception being the pthread tests misbehaving between runs)
2013-07-04test: Add special cases for create-from-png and fallback-resolutionBryce W. Harrington3-0/+16
These tests use reference images somewhat differently from other tests, so treat them as special cases and avoid recommending deleting any of their files. Add TODO's to each test to rework them to be more consistent with other tests. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-04pdiff: Drop unused variableBryce W. Harrington1-1/+1
Fixes: perceptualdiff.c:35:24: warning: unused variable ‘dim’ [-Wunused-variable] Signed-off-by: Bryce Harrington <bryce@bryceharrington.org> Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-04pdiff: Quell warning about signed/unsigned comparisonsBryce W. Harrington1-2/+2
perceptualdiff.c:55:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] perceptualdiff.c:60:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-04test: Make check-ref-dups utilize perceptualdiff for comparisonsBryce W. Harrington1-4/+9
The current sha1sum-based file checker does a blanket comparison of all files with each other, which is fast but not directly helpful since it doesn't distinguish between sibling files (which are allowable to be duplicates). Also, it ignores files that may have byte differences (such as PNG header differences) but are otherwise pixel-identical. This patch replaces the sha1sum-based checker with one that accounts for the default fallback path and uses perceptualdiff to compare files that are bytewise different and verify whether they actually are different. The intention is that the output of this command can be directly used to remove redundant files, e.g.: cd test make check-ref-dups | cut -d' ' -f2 | \ while read f; do git rm "reference/$f"; done This should have no impact on make check's results (modulo any tests that behave erratically), and will help trim down the size of the tarball. Signed-off-by: Bryce Harrington <b.harrington@samsung.com> [ickle: rebase and add the suggested command to the Makefile]
2013-07-04test: Use cmp to catch byte-by-byte identical filesBryce W. Harrington1-8/+12
cmp runs faster than perceptualdiff, and catches files that are exact copies of the reference image. We still use perceptualdiff for catching files that aren't bytewise identical, but are still identical at the pixel level. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-04test: Add script to check for redundant reference imagesBryce W. Harrington2-0/+61
This script requires the perceptualdiff program, which can be built as follows: cd test/pdiff && make perceptualdiff The script's output provides a list of target-specific or format-specific images that are identical to their more generic reference files, and thus are redundant and can be safely removed from the archive without altering any test behaviors. Signed-off-by: Bryce Harrington <b.harrington@samsung.com> [ickle: applied Behdad's suggestion of renaming the script check-refs.sh]
2013-07-04test: Fix make check-ref-dups due to move of ref images to reference/Bryce W. Harrington1-1/+1
The check-ref-dups target in Makefile.am was not updated with the new path when the reference images were moved from test/ to test/reference/. Now it produces output properly again. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-06-28gl: Move glGetUniformLocation to shader compile time.Eric Anholt4-48/+70
The lookup of the string names has significant overhead, which is why GL gives you glGetUniformLocation so that you reference uniforms by constant integers in your high performance path. Reduces cairo-perf-trace runtime of firefox-planet-gnome by 1.06767% +/- 0.289265% (n=72) on my IVB macbook air. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21check: Fix check-def.sh for variations in GCC's linkerChris Wilson1-1/+1
We now need to exclude bss and data sections from the symbol list. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21test: Use the highest precision rendering for shapes for generating ref resultsChris Wilson1-0/+4
The test-traps and test-base surfaces are used for generating the reference results, and so they should opt for using the best rendering paths through the traps- and base-compositors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21cairo-perf-print: Do not free the uninitialised histogramChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21xml: Handle clip-boxes in the updated cairo_clip_tChris Wilson1-5/+72
Edward Zimmerman pointed out that the xml surface had bitrotted slightly and no longer understand the new clip layout - in particular that we can have clips without a path, but just with boxes instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20svg: Unwrap recording surfacesChris Wilson1-2/+14
As a first step towards bring SVG uptodate with the various new patterns, first we need to prevent SVG crashing when it mishandles an unknown recording surface. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20gstate: Speed up stroked path extentsChris Wilson1-12/+12
We can skip the intermediate evaluation of the trapezoids for determining the extents of a stroked path by using the relatively new functions for computing the contours of the stroke. Then we can simply use the bbox of the points within the contours to retrieve the path extents - which is already provided by the polygon holding the contours of the stroke. This provides a faster result with less numerical inaccuracy due to fewer stages required in the computation References: https://bugs.freedesktop.org/show_bug.cgi?id=62375 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20test/get-path-extents: Check exact matches within toleranceChris Wilson1-9/+21
When we refine geometry, we do so to a tolerance as specified by the user. This means that we can not expect tessellated results to have exact results, but always they should match within the specified tolerance. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20image: Mark the data as owned after stealing the snapshot's imageChris Wilson1-1/+1
Victor Goya found that we ended up leaking memory after reading a PNG into an image surface and drawing that onto a PDF surface. In particular, he discovered that commit 0bfd2acd35547fc2bd0de99cc67d153f0170697d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Aug 13 01:34:12 2012 +0100 xlib: Implement SHM fallbacks and fast upload paths introduced a path to steal the image data for a snapshot (and thereby avoid a redundant copy), but that path then lead to the leak of the "owned" data. Reported-by: Victor Goya <victor.goya@af83.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>