summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-14directfb: Correctly chain up map-to-image/unmap to the image backendHEADmasterChris Wilson1-2/+2
Fixes the infinite recursion reported by jojo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-13gles: Switch default framebuffer destinations properlyMartin Robinson1-20/+27
Make _cairo_gl_context_bind_framebuffer handle different types of GLES surfaces properly Since, the multisampling setting of a surface never changes in for GLES, so the first thing we do when setting the destination is to ignore the requested multisampling setting. This simplifies all following logic.
2013-05-07gl: Fix compiler warnings in the GL backendMartin Robinson3-4/+10
2013-05-06gl: Bind the default framebuffer before calling gl{Read|Draw}BufferMartin Robinson1-2/+4
Fix more fallout from separating framebuffer binding from setting the destination. In some cases it is sufficient to call glDrawBuffer/glReadBuffer before binding the framebuffer, but the masking-filling-stroking test of cairo-gl-smoke-tests fails if the order is incorrect.
2013-04-26gl: Update transformation when surface size changesMartin Robinson1-1/+1
In my previous commit I mistakenly removed the transformation matrix update when cairo_gl_surface_set_size is called. This change restores it.
2013-04-26gl: Separate framebuffer bind from destination selectionMartin Robinson3-46/+63
Disentangle the action of binding the framebuffer from setting the destination. This straightens up the code a bit and avoids some redundant operations (such as reacquiring the context) when simply switching from the multi-sample framebuffer to the single-sample framebuffer and vice versa.
2013-04-25xlib: Aquire display before using it in DEBUG message.egag1-2/+2
2013-04-17gl/msaa: Resolve multisampling on surface flushHenry Song3-36/+41
When flushing a surface, we must resolve multisampling for desktop GL. This allows use of the original surface texture in any following raw GL operations. This fixes accelerated canvas with WebKitGTK+ using the MSAA compositor.
2013-04-16png: Avoid marking the surface as in error after a png warningChris Wilson1-7/+7
It turns out that libpng will continue to load an image after throwing a warning, and that libpng16 now throws warnings for images that libpng15 and earlier loaded without error. As we were happily loading those images into cairo surfaces before, we are therefore being overzealous in throwing an error now - so just squelch the warning. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-06xlib: Trim uploads for surfaces extended by PADChris Wilson1-0/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-06xlib: Wrap errors generating sources in an error surfaceChris Wilson1-2/+2
Once upon a time the wrapping was provided by the caller, but the current requirement is that the error is propagated back as an error surface. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=63196 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-04boilerplate/gl: Disable thread awarenessMartin Robinson2-0/+5
This dramatically speeds up testing on NVidia and actually makes it possible to run traces within a reasonable amount of time. cairo-perf-trace results for: NVIDIA Corporation GeForce GTS 250/PCIe/SSE2 3.3.0 NVIDIA 310.14 Before: test min(s) median(s) stddev. count gvim 30.924 31.251 0.72% 5/6 firefox-fishbowl 168.751 201.017 12.46% 8/8 (exited early) After: test min(s) median(s) stddev. count gvim 1.294 1.325 1.79% 6/6 firefox-fishbowl 18.540 19.104 1.54% 6/6
2013-04-04boilerplate: Add a mode for running threaded perf testsMartin Robinson1-1/+6
This is useful because the GL backend runs much faster on some drivers when thread awareness is disabled.
2013-04-02win32: fix corrupted drawingMarc-André Lureau1-1/+2
Fix src bitmap coordinates, which origin is bottom-left. This is apparently a bug in StretchDIBits(), according to some comments on MSDN API documentation. The backend used to have this coordinate change in the past: if (!StretchDIBits (dst->dc, /* dst x,y,w,h */ dst_r.x, dst_r.y + dst_r.height - 1, dst_r.width, - (int) dst_r.height, /* src x,y,w,h */ src_r.x, src_extents.height - src_r.y + 1, src_r.width, - (int) src_r.height, src_image->data, &bi, DIB_RGB_COLORS, SRCCOPY)) https://bugs.freedesktop.org/show_bug.cgi?id=61876
2013-04-02perf: Iteratively prune outliersChris Wilson1-18/+23
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-29quartz: Don't release memory we don't ownMichael Hutchinson1-1/+0
This was causing crashes due to double frees. https://bugs.freedesktop.org/show_bug.cgi?id=62885 Signed-off-by: Benjamin Otte <otte@redhat.com>
2013-03-27pdf: fix typo in bbox checkAdrian Johnson1-1/+1
http://lists.cairographics.org/archives/cairo/2013-March/024186.html
2013-03-23gobject: Add wrapper around cairo_matrix_tNicola Fontana2-1/+7
Reviewed-By: Benjamin Otte <otte@redhat.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-22xcb: Clear temporary replay image in recording playbackUli Schlachter1-4/+5
This gets rid of random noise that we got from the X11 server due to uninitialized memory. Fixes: pdf-surface-source, ps-surface-source, svg-surface-source Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-22Fix "make check" standalone header checkUli Schlachter1-0/+1
This fixes the following error: ./cairo-fixed-private.h: In function ‘_slow_segment_intersection’: ./cairo-fixed-private.h:374:9: error: ‘FALSE’ undeclared (first use in this function) ./cairo-fixed-private.h:374:9: note: each undeclared identifier is reported only once for each function it appears in ./cairo-fixed-private.h:386:12: error: ‘TRUE’ undeclared (first use in this function) Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-22boilerplate: rename xcb-render-0.0 to xcb-render-0_0Uli Schlachter1-2/+2
The test suite uses dots to separate the backend name from the content type. Thus, the backend name must not contain any dots. The xlib backend already calls its RENDER 0.0 target xlib-render-0_0 for this reason. This commit makes the xcb backend match this. Reported-by: Darxus <darxus@chaosreigns.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-22test: Fix handling of dots in CAIRO_TEST_TARGETUli Schlachter1-0/+2
Before this, the following happened: $ CAIRO_TEST_TARGET=image,xcb-render-0.0 make test Cannot find target 'image'. Known targets: image, [...] The reason for this is that _cairo_boilerplate_target_matches_name() doesn't get a null-terminated string, but instead has a pointer to the end of the string. However, strpbrk() expects a null-terminated argument and thus could return a result which points past the end of the input. This commit fixes exactly this. Reported-by: Darxus <darxus@chaosreigns.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-21[ft] I meant fabs(), not abs()Behdad Esfahbod1-1/+1
2013-03-20gl: Fix typo in gles2 shader cache lookupHenry Song1-1/+1
When comparing shader cache entries, it's important that we actually compare the variable type hash.
2013-03-18[test] Set font sizeBehdad Esfahbod1-0/+1
Previously this test was working because we were not scaling bitmap fonts. We do now, so adjust test.
2013-03-18gitignore: negate gitignore for static pkgconfig filesMatt Sealey1-0/+4
Commit 781f253 adds a rule cairo-*.*.* to .gitignore in the root dir. Unfortunately this matches several src/cairo-*.pc.in files in the src directory. The build system requires these files to be present, but the rule is allowing them to be ignored. For example, when extracting a cgit snapshot tarball and checking it into another git repository, these files get left behind. Any accidental changes to these files will go unnoticed by a 'git status' (possibly creating bad installs) and any intentional changes could not be committed (git commit -a will miss them, and every one will need to be forced). This is not really desirable. We don't want to unignore *.pc.in here since there are many, many autogenerated files with this name, and the cairo-*.*.* rule is in general quite useful and doesn't warrant modification (although it could be made a little more specific), so we just make these 4 files a special case and negate the match with full filenames in src/. Signed-off-by: Matt Sealey <matt@genesi-usa.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-18Adding a simple usage statement to cairo-perf-chartMatthew Fischer1-0/+29
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15test: Fix CAIRO_REF_DIRUli Schlachter2-4/+3
Ever since the test output was moved from test/ to test/output/, using CAIRO_REF_DIR to make the test suite succeed no longer works. The test suite was looking for the wrong file names. This patch makes this work again. However, I am not sure that this really is the correct fix. It just seems to work. :-) Reported-by: Darxus <darxus@chaosreigns.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15cff-subset: Fix allocation of width arraysMarek Kasik1-2/+2
fd_default_width and fd_nominal_width are arrays of doubles not arrays of ints.
2013-03-15mempool: Reduce an assert into an error return for get_buddy()Chris Wilson1-1/+2
If we ask for a buddy that is outside of our allocation that is an error that should not happen with a power-of-two allocated zone... However, since it has been seen in the wild, we can safely return that there is no buddy rather than die in a too-late assert. Reported-by: Anton Eliasson <devel@antoneliasson.se> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-14stroke: Use round-joins near inflection points of splinesMartin Robinson1-0/+36
Similar to b7bd5ae4f3da44131261711bb236cd7aa24a3ae3, but applied to the fallback stroke shaper.
2013-03-14stroke: Fix large line widths for fallback stroke shaperMartin Robinson2-8/+116
Fix the test case line-width-tolerance for the fallback stroke shaper. Instead of drawing quads between spline points, draw triangle based on the actual spline edges. This roughly follows the approach of the tristrip and polygonal shapers.
2013-03-14path: Fix a bug in line intersectionMartin Robinson1-12/+27
Before the intersection code was not taking into account that both quotients are required to be in the range (0,1) for the segments to intersect or handling the case of negative numerators and denominators.
2013-03-08gl: Setup operands when the vertex size changesMartin Robinson1-12/+17
Previously _cairo_gl_composite_setup_vbo was overwriting the old context vertex_size, while _cairo_gl_context_setup_operand was relying on it to determine if the vertex size changed. Instead of a fragile ordering of statements, pass whether the vertex size changed as an argument to enforce the calling order via method parameters.
2013-03-08gl: Fix typo s/bool/cairo_bool_t/Chris Wilson1-1/+1
One quickly gets used to having stdbool.h available.
2013-03-08gl: Export query for EGLContext and EGLDisplay from deviceHenry Song2-0/+39
Similar to glx, add query for the EGLContext and EGLDisplay to egl-based cairo devices.
2013-03-08[FT] Prefer downscaling bitmap glyphs to upscalingBehdad Esfahbod1-3/+12
Say, you have bitmap strikes for sizes 50ppem and 100ppem. To render at 60ppem, it's much better to downscale the 100ppem bitmap than upscale 50ppem one. Prefer downscaling.
2013-03-01pdf: Fix crashJana Saout1-1/+1
Bug 61451
2013-02-24xlib: Fix invocation of XRenderFindFormat()Chris Wilson1-1/+1
The 'count' parameter is an indication to libXrender of the number of matches to skip before reporting (rather than a limit on the number to report). As we only want the first match, always pass 0. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-19pdf: add missing 'endobj' to shading dictAdrian Johnson1-2/+4
https://bugs.launchpad.net/ubuntu/+source/libcairo/+bug/1051939
2013-02-19image: Compare against the true size of the embedded bufferChris Wilson1-1/+1
When querying whether the run is small enough to fit inside the pre-allocated temporary buffer, we need to avoid comparing against sizeof(buf) as buf is a variable length array and so sizeof() is meaningless. Reported-by: Edward Zimmermann <Edward.Zimmermann@cib.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-15win32: Free the fallback upon finishChris Wilson1-0/+3
Zozó Teki pointed out that we leak the fallback surface upon finish in case it was active at the time as the preceding flush would only clear the damage and not decouple the fallback surface. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-15gl: disable GL_DITHERHenry Song1-0/+2
GL_DITHER is enabled by default by spec. Leaving GL_DITHER enabled causes color pixel mismatch on some drivers by comparing uploading then readPixels and original image.
2013-02-12test: Exercise replaying a recording surface through a flip matrixChris Wilson11-0/+494
2013-02-12path: Fix bbox computation for negative scale factorsChris Wilson1-0/+11
The fast path for transforming a path by a simple scale factor, forgot to fix up the orientation of the box if that scale factor was negative. Reported-by: Edward Zimmermann <Edward.Zimmermann@cib.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12recording: Avoid indirection through indices array if not reducedChris Wilson1-1/+1
If we don't discard any elements, then the index array is simply a 1:1 mapping of the element array, and we may as well bypass it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12spans: Mark the surface as cleared in preparing for recording surface playbackChris Wilson1-1/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10Post release version bump to 1.12.15Chris Wilson1-1/+1
2013-02-101.12.14 releaseChris Wilson2-1/+33
2013-02-10tests: Update reference images after adjustments to polygon line clippingChris Wilson11-0/+0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>