summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-15ordered interesectionswip/master-tor-ordered-xM Joonas Pihlaja1-5/+10
2010-05-11win32: Grow glyph extents to account for ClearTypeJonathan Kew1-0/+13
Add extra pixel on each side of the glyph's black box returned by GetGlyphOutlineW, to avoid clipping ClearType pixels. From https://bugzilla.mozilla.org/show_bug.cgi?id=445087
2010-05-11Ensure the quartz backend returns the first stop for negative positions on ↵Robert O'Callahan1-2/+22
the gradient line of a nonrepeating linear gradient. I discovered a small bug in cairo-quartz gradients. If you have multiple stops at position 0, then cairo-quartz pads with the *last* stop at position 0, instead of the first stop at position 0. This patch fixes that. From https://bugzilla.mozilla.org/show_bug.cgi?id=513395
2010-05-11Don't repeat a Quartz gradient more times than necessary, to avoid Quartz ↵Robert O'Callahan1-82/+179
quality problems when there are lots of repeated color stops. -- Add a parameter to _cairo_quartz_setup_source so we can pass down the extents of the object we're drawing -- Compute fill/stroke/glyph extents and pass them down in the cases we need to (repeating/reflecting gradients) -- Pass those extents on down to where we set up the gradients -- Make _cairo_quartz_setup_linear_source fall back to pixman for the degenerate case where the linear gradient vector has no length -- In CreateRepeatingRadialGradientFunction and CreateRepeatingLinearGradientFunction, use the object extents (or surface extents, for the paint() case) instead of the clip box to calculate the parameters for the gradient -- I've changed the way CreateRepeatingLinearGradientFunction calculates the repetition count. The new approach gives much more precise bounds on the number of repetitions needed (and is very similar to what we do for radial gradients). This is important because if we specify a much larger input range than we really need for our gradient color function, Quartz samples it too coarsely over the range we actually care about, and the gradients look bad. For example, suppose start = (5,0), end = (6,10), the CTM is identity and the bounds we want to cover is (0,0)-(10,10). I think the current approach sets up the gradient to be repeated 10 times. In fact only 3 repetitions are needed. Also, using 'width' here didn't look right: - y_rep_end = (int) ceil((surface->extents.width - MAX(mstart.y, mend.y)) / dy From https://bugzilla.mozilla.org/show_bug.cgi?id=508730
2010-05-11Clean up Quartz gradient code by moving some local variables to static const ↵Robert O'Callahan1-18/+13
globals. From https://bugzilla.mozilla.org/show_bug.cgi?id=508730
2010-05-11quartz: Don't fallback to pixman for repeating radial gradients.Robert O'Callahan1-23/+180
Figuring out where the outer circle should move to is tricky. I hope the algebra in there is understandable. This is a nice performance improvement, probably because we avoid painting the gradient over the entire clipBox (which is usually the entire surface). I tried to write reftests that compared a repeating radial gradient to a non-repeating gradient with manually repeated stops, but it didn't work because the rasterization was slightly different --- I'm not sure why. This patch also forces us to use pixman for all degenerate cases where the circles intersect. This at least makes us consistent across platforms. From https://bugzilla.mozilla.org/show_bug.cgi?id=508227
2010-05-11trace: And for the bonus round... Make it compile.Chris Wilson1-2/+2
2010-05-11trace: Try wrapping FT_Open_Face()Chris Wilson1-12/+26
We have to be careful to disambuigate an internal call by FreeType from the application.
2010-05-10Add an additional set parantheses around the container_of macroJeff Muizelaar1-1/+1
The non-__GNUC__ version of the container_of macro would do wrong when used like container_of(...)-> because '->' binds tighter than the cast in the container_of macro. Adding an additional set of parantheses fixes this.
2010-05-10xcb: trivial memfault fixes.Chris Wilson9-47/+123
The first fixes required to kick-start memfault testing of the xcb backend.
2010-05-10region: _cairo_region_create_in_error()Chris Wilson3-13/+60
Avoid leaks when reporting memfault associated with constructing regions.
2010-05-08xcb: Find the correct xcb_screen_t for faking ScreenChris Wilson1-2/+21
When choosing the xcb_screen_t to use for the xlib-xcb backing surface, it helps if it matches the screen used to generate similar surfaces and snapshots - otherwise we end up pulling the image back from the XServer every time we want to use the Picture.
2010-05-08xcb: Upload images in place.Chris Wilson3-16/+189
A common operation is to store an image in a similar surface, so construct a fast path to avoid the allocation and double-blit through a temporary pixmap.
2010-05-08xcb: Reset picture after failed snapshot.Chris Wilson1-2/+2
Clear the local picture variable if we cannot use the snapshot so that we are forced to create a new and valid picture.
2010-05-08test: Force cairo-test-suite to return SUCCESSChris Wilson1-0/+10
Set the CAIRO_TEST_FORCE_PASS environment variable to run through the test suite and ignore errors. Useful for forcing distcheck to continue past a broken test suite.
2010-05-08subsurface: Don't double apply device offset for deep subsurfaces.Chris Wilson1-5/+5
If we have a subsurface of a subsurface then the device offset has already been applied to the extents that we use to offset the new subsurface.
2010-05-08gl: Make the shader implementation per-context, not globalBenjamin Otte5-112/+131
2010-05-08gl: Print GL errors when releasing the deviceBenjamin Otte2-26/+11
Don't scatter calls to error printing around everywhere, instead do it in the one place where it matters. Also, convert the functions to macros, so we can use __FILE__ and __LINE__ when printing a warning
2010-05-08gl: Make check_span_renderer() call not require a device lockBenjamin Otte3-2/+11
Note that we didn't lock the device previously, so the function was broken.
2010-05-07cairo: Special case cairo_t with NULL_POINTERChris Wilson1-1/+23
Avoid allocation for the potential user error of attempting to use cairo_create(NULL).
2010-05-07test/copy-path: memfault status checks.Chris Wilson1-23/+38
2010-05-07surface-fallback: Only destroy the clip after it has been initialized.Chris Wilson1-3/+4
More memfault detected error path errors.
2010-05-07Remove useless null checks of a and b in _cairo_path_fixed_equaltimeless1-14/+8
'a' and 'b' are dereferenced before being checked for null. From https://bugzilla.mozilla.org/show_bug.cgi?id=555706
2010-05-07quartz: Work around bad glyph extents returned by CoreGraphics for empty ↵Jonathan Kew1-0/+10
glyphs in Al Bayan font This resolves the problem by checking for the crazy glyph bbox result from CoreGraphics, and replacing it with an empty rect. From https://bugzilla.mozilla.org/show_bug.cgi?id=534260
2010-05-07doc: regenChris Wilson26-0/+93
2010-05-07subsurface: Include device offset in extentsChris Wilson1-2/+8
Adjust the subsurface extents so that the user specifies the extents in world space rather than device space.
2010-05-06Remove comma from the end of the CAIRO_PATTERN_ACQUIRE enumJeff Muizelaar1-1/+1
2010-05-06gl: Enable fixed-function without glsl.Chris Wilson1-25/+31
Through a very simple mistake we were triggering fallbacks after detecting we were not able to perform the composite using GLSL -- we were just returning the UNSUPPORTED status instead of enabling the fixed-function path.
2010-05-06Update license blocks to use "Mozilla Foundation" instead of "Mozilla ↵Metal Sonic8-8/+8
Corporation" From https://bugzilla.mozilla.org/show_bug.cgi?id=507387
2010-05-06cairo: stash a number of contexts for use with NO_MUTEXChris Wilson1-1/+32
The implementation is the same as the atomic one (bar the use of atomic primitives to manipulate the occupancy!). Patch based on the original by Jeff Muizelaar.
2010-05-06device: Reorder finalization so that user data is destroyed last.Chris Wilson2-4/+9
As the user is likely to attach the underlying resources to the device for automatic collection upon finalization, it is important that the user data is then destroy last (so that those resources are still available in the surface and device cleanup routines).
2010-05-06test/gl-surface-source: Attach GLXContext to device user data.Chris Wilson1-15/+11
As we actually use the GLXContext to create the device, we only want to free those resources upon the final unreference of the device (and not the initial surface).
2010-05-06Add an implementation of ffs() for MSVCJeff Muizelaar1-0/+15
2010-05-06surface-fallback: Handle memfaults during clipping.Chris Wilson1-11/+15
Don't be lazy, propagate the error rather than asserting.
2010-05-06test: Add gl-surface-sourceChris Wilson6-0/+125
Exercise using GL sources.
2010-05-06test/clip-contexts: Free secondary contextChris Wilson1-0/+2
2010-05-06test: Add subsurface-image-repeatChris Wilson5-0/+73
Test handling of source clipping with an image - principally to check handling of mime types and zero-copy image snapshotting in the vector surfaces and ensure that they work with subsurface patterns as well.
2010-05-06xlib: Remove reference counting for cairo_xlib_screen_tChris Wilson5-147/+46
The screen is owned by the cairo_xlib_display_t device, so we can simplify and close the refleak by removing the surplus reference counting.
2010-05-06xlib: Convert visual array to a cairo_list_tChris Wilson2-54/+26
It's simpler and more memory efficient.
2010-05-06xlib: Remove screen->has_renderChris Wilson2-14/+4
Use the info from the display instead.
2010-05-06xlib: Remove obsolete comment, there is no race anymoreChris Wilson1-4/+0
The display lock is now held for the duration of the screen creation, so there is no race. Remove the false comment.
2010-05-06xlib: Ensure the global display mutex is initialized before use.Chris Wilson1-0/+2
2010-05-06image: Propagate error instead of asserting.Chris Wilson1-1/+2
Apparently we can get to this point without evaluating the clip surface, so return the error status rather than assert.
2010-05-06clip: Propagate failure from retrieving the previous clip surface.Chris Wilson1-1/+2
2010-05-05test: Add xlib-expose-event.image16.ref.pngChris Wilson2-0/+1
2010-05-05scaled-font: Pluck last glyph from the most recent page.Chris Wilson1-1/+1
In converting to cairo_list_t, it helps to preserve the semantics of appending the page to the end of the list where it is expected to be plucked in the event of an allocation failure.
2010-05-05PS: Add missing 'q' when resetting clip pathAdrian Johnson1-1/+1
2010-05-05gl: Get rid of ctx variableBenjamin Otte1-6/+6
The code used renderer->ctx and ctx interchangably, that was confusing.
2010-05-05gl: Another case of proper device acquiringBenjamin Otte1-6/+9
This patch isn't strictly necessary, but it cleans up the code.
2010-05-05gl: Get rid of another cast to cairo_gl_context_tBenjamin Otte1-3/+3