summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-16gl: Fix the offset of non-texture source surfacesHEADmasterMartin Robinson1-1/+1
2011-12-16egl: do not destroy dummy_surface if it does not existPekka Paalanen1-1/+2
On deleting an EGL device, it is possible that cairo_egl_context_t::dummy_surface is EGL_NO_SURFACE. In that case calling eglDestroySurface() on it will lead to EGL_BAD_SURFACE error. Check dummy_surface before destroying it. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-16gl/msaa: Scissor simple rectangular clipsMartin Robinson1-27/+53
Instead of using the stencil buffer to perform simple rectangular clips, just scissor the clip rectangle. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> [ickle: fixed application to master]
2011-12-15test: Use fork() on MacOS XAndrea Canciani1-4/+1
MacOS X 10.7 (and maybe some previous versions, too) can fork() processes which use CoreGraphics. This makes it possible for cairo-test-suite to withstand a test crash without killing the whole suite. The old behavior is still available using the '-f' (foreground) option.
2011-12-15gl/msaa: Ignore the antialiasing property of the clip.Martin Robinson1-4/+10
If the clip suggests anti-aliasing and we don't support it, draw the clip anyway. Currently disabling anti-aliasing does not disable anti-aliasing on certain clips. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-15gl/msaa: If stenciling the clip fails, reset the color mask.Martin Robinson1-0/+1
If the clip failed, not resetting the color mask leaves the GL context in a state in which we cannot draw anything. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-15gl: Disable the msaa compositor by default (for release testing)Chris Wilson1-2/+12
One of the remaining issues with msaa is Cairo's insistence on allocating a depth-stencil for every target. These cause massive overallocation and prevents my machines from completing cairo-perf-trace. So for the time being switch back to the old fashioned span-based compositor. To continue development of msaa, or indeed other compositors, we introduce the CAIRO_GL_COMPOSITOR env variable to allow the default compositor to be selected. Use CAIRO_GL_COMPOSITOR=msaa to continue to use the msaa compositor for instance. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-12gl: Set the destination for swap buffers, required by EGL at leastChris Wilson1-1/+4
EGL mandates that the current context be valid for a call to swapbuffers, and does not just operate upon the drawable passed in. The current code prevents this as a side effect of calling flush decouples the current context (so that the state can be clobbered by the application without impacting upon Cairo). So when we try to swap, EGL complains. We can get the desired behaviour by setting the surface upon the context, thus calling MakeCurrent as necessary, and then flushing any pending operations before swapping. This has the positive side-effect of not clobbering our own state unnecessarily. Reported-by: Pekka Paalanen <ppaalanen@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-11xcb: Add a special case for recording surfaceUli Schlachter1-0/+70
An unbounded recording surface will complain loudly when you call acquire_source_image on it and thus we need a special case which draws the recording surface to a temporary surface and then proceeds with that. Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-11xcb: Move the surface picture setup into its own functionUli Schlachter1-22/+30
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-11xcb: Silence compiler warnings about ignored return valuesUli Schlachter2-2/+9
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-11xcb: Silence a compiler warning for mixing type and internal type enumsUli Schlachter1-1/+1
cairo-xcb-surface-render.c:1134:35: warning: comparison between 'cairo_surface_type_t' and 'enum _cairo_internal_surface_type' [-Wenum-compare] Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-10doc: fix typosAdrian Johnson1-3/+3
2011-12-10ps: simplify the EPS save and restoreAdrian Johnson1-7/+3
userdict is not permitted in EPS files. Since the PS surface does not leave extra operators or dictionaries on the stack the EPS prolog and trailer can be reduced to: save 50 dict begin .... end restore The save/restore pair is required to remove fonts and restore the graphics state. As "restore" does not restore the dictionary stack, using a new current dictionary for the EPS file allows the cairo dict entries to be cleaned up at the end the EPS. Bug 43634
2011-12-09gl: Track surface references through operandsChris Wilson2-0/+5
In the case where we created a surface to handle an operand, it needs to be freed when we release the operand. However, we also have to be careful not to introduce reference cycles into ordinary surfaces, so always remember to teardown the composite setup! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-09gl: fix bug in _cairo_gl_surface_embedded_operand_init()Chuanbo Weng2-2/+1
The operand->texture.surface should be set to right value, not NULL. Otherwise, when doing _cairo_gl_surface_operand_init(), the texture.surface in operand struct will also be NULL, which is incorrect. This fix regression suite in 43 test cases(such as source-clip) in cairo/test/. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-08xcb: Fix invalid casts from cairo_content_t to cairo_format_tUli Schlachter1-4/+4
This was introduced in a69335a84e when the second argument of _cairo_xcb_surface_create_similar_image was changed from content to format. Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-07gl: Decouple the glyph upon evictionChris Wilson5-90/+81
In order to decouple the texture node from the scaled glyph cache, we need to add a callback from the rtree for when the node is removed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-07doc: Add documentation for cairo_raster_source_patternChris Wilson3-0/+241
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-07gl: Prevent leak of the white source used with glyph masksChris Wilson1-4/+7
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-07gl: Defer stencil allocation until useChris Wilson3-19/+42
Allocating a stencil and a depth buffer for every destination surface is simply too expensive and causes major resource issues. So defer the allocation and attachment of a stencil buffer until just prior to first use. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-06test: Exercise copy/filling unsorted rectanglesChris Wilson5-0/+152
Exercise the bug Keith found in the xlib backend, which claimed the output from the rectangular tessellator would always be sorted. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-06Clip rectangles are not necessarily YSortedKeith Packard1-1/+1
None of the cairo clipping computations guarantee that the resulting list of rectangles are constructed in any particular order. Promising that they are results in an X error (BadMatch) which generally causes applications to crash. I suspect this may well be implicated in many (many) bug reports about applications which use cairo. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-06test: reference ref images after tweaking polygon clippingChris Wilson16-0/+0
2011-12-06polygon: Tweak the y-coordinates of the edge so that it is inside the clipChris Wilson1-0/+12
As we evaluate the line first using y-for-x to find the clipped vertical range and then rasterise the line using x-for-y, we can incur severe rounding errors that cause us to draw beyond the clipped region. The first simple attempt at a fix is to tweak the clipped vertical range such that the evaluated extents of the line are contained. Reported-by: Taekyun Kim <tkq.kim@samsung.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-06polygon: Assert that we add edges that are wholly contained by the clipChris Wilson1-1/+42
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-06gl: Re-enable the CLEAR optimisationChris Wilson1-4/+2
It was temporarily disabled whilst the surface API was in flux. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-06pdf: avoid using pdf patterns to paint/fill translucent linear/radial gradientsAdrian Johnson1-35/+58
2011-12-06pdf: avoid using pdf patterns to paint/fill opaque linear/radial gradientsAdrian Johnson2-34/+205
Patterns are slower and use more memory to print. For painting and filling we can use the shading operator to draw gradients.
2011-12-06ps: allow embedding of cmyk jpeg imagesAdrian Johnson1-5/+21
2011-12-06pdf: allow embedding of cmyk jpeg imagesAdrian Johnson1-3/+15
2011-12-06ps: avoid padding images if the padding is not required to fill the extentsAdrian Johnson1-24/+35
2011-12-06pdf: don't use patterns with padded imagesAdrian Johnson1-115/+131
and avoid padding if the padding is not required to fill the extents.
2011-12-06type1-subset: remove unused variablesAdrian Johnson1-4/+4
2011-12-06truetype-subset: remove unused variableAdrian Johnson1-2/+0
2011-12-05xlib-xcb: Implement surface_set_drawableUli Schlachter1-1/+5
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-05xcb: Fixup some internal state in set_{drawable,size}Uli Schlachter4-4/+37
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-05gl: Unbreak the glyph cacheChris Wilson2-14/+12
Use the embedded operand on the surface instead of copying it across and trying to then wrap the surface from it - as it would then unref the glyph cache surface after the operation and so we would lose the glyphs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05fallback: fix the offset for paintingChris Wilson1-2/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Set the device offset on map-to-imageChris Wilson1-0/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Propagate clip regionChris Wilson3-1/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Substitute the white source for the default patternChris Wilson1-0/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Decouple glyphs on shutdown from the scaled font cachesChris Wilson3-10/+47
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Embed the operand rather than a pattern into the glyph cacheChris Wilson2-31/+19
Use the native encoding for patterns. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Use the embedded operand to allow passing sources aroundChris Wilson8-209/+136
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Propagate surface texture to embedded operandChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Check against user-provided invalid sizesChris Wilson3-0/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-05gl: Make the backend struct staticChris Wilson2-4/+5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-02doc: Drop the gtk-doc markup from _cairo_radial_pattern_focus_is_insideChris Wilson1-3/+3
Stop confusing gtk-doc with this private function. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-02doc: add CAIRO_DEVICE_TYPE_COGLChris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>