summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-10-31xlib: Use the dest pixman format and composite if it doesn't match the ↵em/RPI-427-breaks-image-surface-formatEmanuele Aina1-3/+3
source one Get the correct pixman format for the destination xlib surface and handle the case where it does not match the source format by compositing instead of blitting.
2014-10-31xlib: Get the correct pixman format on BGR systemsEmanuele Aina1-1/+1
cairo_format_t cannot represent all the kind of visuals used by X, use _pixman_format_for_xlib_surface() to properly detect the pixman format even on BGR systems.
2014-06-02image: Use pixman_fill for _fill16_spansrpi-1.12.16Derek Foreman1-11/+21
Currently _fill32_spans uses pixman_fill which usually results in a high performance ASM fast path operation. This patch makes 16 bit span fills also use pixman_fill.
2013-08-261.12.16 releaseupstream-1.12.16Chris Wilson2-1/+56
2013-08-26Make "make check" happyChris Wilson1-0/+6
A recursive include should hide the bare header from check-preprocessor-syntax.sh Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23win32: Prevent double-free of similar imagesChris Wilson2-2/+4
Based on a patch and analysis by Michael Henning. When we create a similar-image surface for win32, we set up a couple of back references from the image to the win32 surface, and vice versa. We need to be careful when decoupling the reference cycle to avoid chasing around the loop upon destruction. Currently we handled destroying the similar-image via the parent win32 surface, but similar precaution is required when destroying the surface via the similar-image. Reported-by: Michael Henning <drawoc@darkrefraction.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63787 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23Provide backwards compatibilty with old pixmanChris Wilson8-19/+86
The goal is to allow compilation against older pixman to ease regression testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-19gl: Return surface in error when creating oversized texture surfacesMartin Robinson3-11/+111
When creating a texture surface that is larger than the maximum framebuffer or texture dimensions of the context, return a surface in error. Previously the code failed an assertion, but this prevents an application from easily detecting when to fall back. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-19gl/msaa: Clean up msaa depth/stencil buffer for OpenGLESHenry Song1-1/+2
OpenGLES also uses the depth/stencil buffer when doing multisampling, so it's a leak to only clean up the buffer for desktop OpenGL.
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-05[ft] Ensure alignment of bitmaps received from FreeTypeBehdad Esfahbod1-0/+9
2013-08-05[ft] Fix alignmentBehdad Esfahbod1-6/+3
2013-07-30Revert accidentally committed stuffBehdad Esfahbod1-3/+3
2013-07-30[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-16gl/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-16gl/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-16gl/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>