summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-09svg, test: Refer to output filename by variable, not a hardcoded valueHEADmasterBryce W. Harrington1-1/+1
Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-09test: Ensure output dirs exist, falling back to current dir if neededBryce W. Harrington13-55/+66
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> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-09test: Make cairo_test_mkdir() usable throughout tests.Bryce W. Harrington2-5/+8
Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-09test: Fix several tests to place output files in the output directoryBryce W. Harrington11-17/+30
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_DIR (which defaults to cairo/test/output) as well, in the interest of decluttering the test directory. Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-09test: Don't ignore test output files left in test directoryBryce W. 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> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-06svg: Don't embed CMYK Jpeg imagesAdrian Johnson1-0/+3
None of the SVG viewers I tried (rsvg, firefox, inkscape) support CMYK Jpeg images. Bug 68965
2013-09-06Downscaling requires pixman 0.30Adrian Johnson1-1/+1
2013-09-05script: Add support for replaying device-scaleChris Wilson1-0/+48
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05trace: Record set-device-scaleChris Wilson1-0/+12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05surface: Inherit device scale in cairo_surface_create_similar()Alexander Larsson1-0/+7
Without this most code that uses similar surfaces for offscreen rendering will render in a pixelized fashion if the final target uses a device scale.
2013-09-05surface: Merge scratch construction into _cairo_surface_create_scratchAlexander Larsson13-147/+145
We merge _cairo_surface_create_similar_scratch and _cairo_surface_create_similar_solid into a single function named _cairo_surface_create_scratch, to avoid confusion with cairo_surface_create_similar which now will have a different behaviour wrt the sizes and the device-scale. _create_scratch assumes the width and height are in backend coordinates, while create_similar does not.
2013-09-05surface: Opencode create_similarAlexander Larsson1-3/+30
We copy the _cairo_surface_create_similar_solid code into cairo_surface_create_similar so that we can separate these later as one wants to use backend sizes and one not.
2013-09-05test: Allow CAIRO_TEST_MODE to independently enable extended testingChris Wilson1-4/+18
Such as CAIRO_TEST_MODE=scale for testing application of cairo_surface_set_device_offset. CAIRO_TEST_MODE=similar - test rendering through similar surfaces CAIRO_TEST_MODE=offset - test rendering with a device offset CAIRO_TEST_MODE=scale - test rendering with a device scale
2013-09-05tests: Add device scale test to "full" testrun similar to offsetsAlexander Larsson3-57/+77
2013-09-05surface: expose the device scaleAlexander Larsson6-28/+61
This adds the new public functions cairo_surface_set_device_scale and cairo_surface_get_device_scale and updates old users of the internal functions.
2013-09-05spans,traps: Undo device transform from source matrix for recording replaysChris Wilson2-5/+23
As the replay of the recording surface applies the device_transform of the matrix once again to all its operations, we end up with a repeated transform through the source matrix of the recording surface. We need to remove one of these, and the easiest way to do that appears to be to undo the application to the source matrix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05gstate: Handle device scale on surface as sourceAlexander Larsson4-16/+23
When creating a transformed pattern we must apply the device transform *before* the transform set on the pattern itself, otherwise e.g. its translation will not be affected by the device scale. We also fix up the device_transform related handling in _cairo_default_context_pop_group(). With a device scale we can no longer just use the device_transform_inverse to unset the device offset for the extents, so we make that a simple translate instead. We also remove some weird code that tries to handle the device transform but seems unnecessary (maybe a workaround for applying the device transform in the wrong order?). With that code removed things work fine, but with it things get translated wrongly when there is a scale.
2013-09-05gstate: Move device-scale font scaling to gstateAlexander Larsson3-31/+13
If we do this in surface it will be applied twice then we chain to a different surface, like e.g. a subsurface. We also remove a hack in cairo-surface-wrapper where it compensated for the device scale not being applied. v2: Compute the backend CTM in ensure_scaled_font().
2013-09-05subsurface: Handle device scalesAlexander Larsson1-3/+18
2013-09-05default-context: Inherit device scale in push_group surfaceAlexander Larsson1-0/+4
Without this we will only render to part of the newly created surface and then copy+scale that part back, which causes fuzziness.
2013-09-05gstate: Respect device transform in strokeAlexander Larsson1-3/+12
We need to apply the device transform to the ctm when stroking, as otherwise line widths are not affected by the device scale.
2013-09-05image: Use convolution filters for sample reconstruction when downscalingKrzysztof KosiƄski1-10/+55
I had a look at how complex would it be to add correct downscaling to Cairo now that Pixman supports convolution filters. It turns out it this is rather easy. Here is an initial, minimal attempt. It uses convolution filters only if the image is being downscaled by more than half a pixel in at least one dimension. Some discussion: 1. The sampling and reconstruction kernels are picked in a way that gives comparable quality when upscaling and downscaling. I paired box sampling with bilinear reconstruction and impulse (point) sampling with box reconstruction. This gives the expected result for NEAREST filter. BEST filter uses Lanczos3 for both kernels. > Do we need to use a reconstruction filter for NEAREST at all? Or maybe > differentiate between NEAREST and FAST in that case? If impulse (point) sampling is used, there must be some reconstruction filter, otherwise no image is produced. That's because the sampling grid does not match the data grid, and since there is no reconstruction filter, values between data points are undefined. The alternative is to use box sampling + no reconstruction. 2. Subsampling bits are always set to 1, since this doesn't seem to affect quality at all. 3. I am not sure whether this code works correctly for matrices with a skew component. It should be OK for any combination of scale, rotation and translation. 4. This patch causes new failures in the test suite: - recording-surface*: possibly an effect of improved quality. - surface-pattern-scale-down*, surface-pattern-big-scale-down: the reference images should be updated. - pthread-same-source: I have no idea why this is failing, since this test shouldn't even trigger the new code. - large-source-roi: this test attempts to downscale an image which is 30000 pixels wide down to 7 pixels. The filter parameters seem to be created correctly, but they might trigger an overflow somewhere in the convolution code; the output rectangle is white instead of red, as if nothing was drawn. - device-offset-scale: there are subtle differences which look like convolution-related smoothing; I'm not sure whether this is OK or not.
2013-09-05Bump version for new development tree, 1.13.1Chris Wilson1-2/+2
2013-08-26Post-release version bumpChris Wilson1-1/+1
2013-08-261.12.16 releaseChris 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-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>