summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-11-07[hash] Return lookup entry.Chris Wilson10-88/+67
Use the return value to return the result from _cairo_hash_table_lookup() (as opposed to filling an output parameter on the stack) as this (a) results in cleaner code (no strict-alias breaking pointer casts), (b) produces a smaller binary and (c) is measurably faster.
2008-11-07[hash] Set is_unique when finding an available for insertsKarl Tomlinson1-9/+7
As we obey the rule in Cairo that we only insert if we know that there is no existing entry in the hash table, we can therefore perform a much quicker search knowing that the key is unique.
2008-11-07[test] Fix-up rgb byte packingChris Wilson2-5/+11
Another embarrassing, but thankfully, trivial bug.
2008-11-07[surface] Pass a separate closure for the mime-type destroy notifier.Chris Wilson7-13/+24
A limitation of the current API was that the destroy notifier was called on the mime-data block. This prevents the user from passing in a pointer to a managed block, for example a mime-data block belonging to a ref-counted object. We can overcome this by allowing the user to specify the closure to be used with the destroy notifier.
2008-11-06[NEWS] Add a few notes.Chris Wilson1-0/+42
Help Carl with a speedy snapshot by writing a few notes about what has been added so far to 1.9.
2008-11-06[in-fill] Fix transposed arguments.Chris Wilson1-1/+1
Silly typo that escaped the test suite.
2008-11-06[test] Add off-centre tests to in-fill-trapezoid.Chris Wilson1-0/+66
Reading through the previous commit spotted that the arguments to edge_compare_for_y_against_x were transposed, but the test-suite had failed to catch detect it. This is due that in order to actually solve the equation we need to have a diagonal edge passing near an off-centre point of interest, which was not among the test cases. So add some off-centre tests to fully exercise the code.
2008-11-06[in-fill] Avoid tessellation by counting number of edge crossing to -∞Chris Wilson4-25/+279
Benjamin Otte reports that in one particular benchmark cairo_in_fill() is a hotspot in the profile. Currently we tessellate the entire path and then search for a containing trapezoid. This is very expensive compared to the simple method of counting the number of edge crossing between the point of interest and x=-∞. For example, this speeds tessellate-256 up by almost 3 orders of magnitude.
2008-11-06[test] Add WINDING variants to in-fill testChris Wilson1-0/+56
Check cairo_in_fill() with some WINDING tests as well as the current EVEN_ODD.
2008-11-05[trace] Only build if we have zlib.Chris Wilson1-1/+3
Use the configure check for libz and do not attempt to build the trace unless we have zlib.
2008-11-05[test/pdf2png] Remove dependency on GdkPixbufChris Wilson2-14/+20
It's appears to be dropped from the current poppler trunk, so just use our own venerable cairo_surface_write_ton_png().
2008-11-05[png] Complete the idempotent read_png() -> write_png()Chris Wilson1-0/+14
Write out the original PNG mime-data if attached to the surface during cairo_surface_write_to_png(). Similar to how the compressed alternate representations are handled by the other backends. Note: by automatically attaching and using the mime-data in preference to the image data, we break the read_from_png(); draw(); write_to_png() cycle.
2008-11-05[trace] Use the mime-type image representationChris Wilson1-89/+214
When emitting image data, first check to see if we have a pre-compressed alternate representation.
2008-11-05[test] Update mime-data to check image/pngChris Wilson7-23/+45
Add a "image/png" mime-type test.
2008-11-05[svg] Embed original PNG data.Chris Wilson1-0/+38
Embed the attached PNG representation of a surface in preference to re-encoding the surface.
2008-11-05[png] Attach the png representation to cairo_surface_create_from_png().Chris Wilson5-59/+122
Attach the original png data as an alternate representation for image surfaces created by cairo_surface_create_from_png().
2008-11-05[surface] Don't allocate a structure for mime_data == NULL.Chris Wilson1-7/+10
If the user attempts to clear the attached mime data representation, just clear the user data slot and do not allocate an empty structure.
2008-11-05Define RepeatNone, etc if the available Render version doesn't (#18385)Behdad Esfahbod1-0/+18
2008-11-05[svg] Embed jpeg data.Chris Wilson2-4/+47
Support jpeg embedding for svg output.
2008-11-05[trace] Trim a few bytes from glyph arraysChris Wilson1-27/+38
Remove some redundant whitespace from the glyph arrays to improve readability and shrink the output file size.
2008-11-06win32-printing: Implement JPEG supportAdrian Johnson2-9/+85
2008-11-05[matrix] Remove stray offset from previous commit.Chris Wilson5-4/+4
I moved the pixel centre to xc,yc but forgot to remove it during compensation - as caught by the test suite. Refresh a couple of reference images that depend upon exact pixel-centre rounding conditions.
2008-11-05[matrix] Compensate pixman_matrix in device space.Chris Wilson2-23/+34
We wish to reduce the visible error when converting to a pixman matrix, so perform the compensation in device space instead of pattern space.
2008-11-05[pattern] Split the translation between the matrix and [xy]_offsetChris Wilson5-2/+5
pixman limits the src] co-ordinates (and thus [xy]_offset] to 16bits, so we need to be careful how much of the translation vector to push into [xy]_offset. Since the range is the same for both, split the integer component between the matrix and the offset. test/scale-offset* now at least shows the source image, even if it is misplaced.
2008-11-05[trace] Correct emission of set_font_face and set_sourceChris Wilson1-9/+27
set_font_face was not consuming it's operand but blithely placing an undefined font_face onto the operand stack, whereas set_source was performing invalid exchanges on the stack.
2008-11-05[trace] Capture foreign drawables.Chris Wilson1-9/+93
If we attempt to use a surface as a source before we write to it, record the surface contents.
2008-11-05[trace] Mark filter mode as immediate.Chris Wilson1-1/+1
Be consistent and use "//" for the filter mode to indicate a constant.
2008-11-05[test] Mark targets with is_meta?Chris Wilson3-17/+37
Allow tests to skip targets based on whether they are a meta surface or not.
2008-11-05[test] Add scale-offset-(similar|image)Chris Wilson7-0/+291
Add a test case for the scaling bug reported by Michel Iwaniec: http://lists.cairographics.org/archives/cairo/2008-November/015660.html
2008-11-05[test] Only depend on any2ppm if we build it.Chris Wilson1-1/+4
Do not add a dependency to any2ppm if it has been deconfigured.
2008-11-05[matrix] Minimise pixman conversion error.Chris Wilson11-32/+60
Minimise the error of the pixman matrix about the centre of the displayed area rather than the origin.
2008-11-04[trace] Fix emission of cairo_scaled_font_create()Chris Wilson1-14/+13
In the case where the font face was no longer on the operand stack, the font face would not have been passed to cairo_scaled_font_create().
2008-11-04[trace] Use a common directory by default.Chris Wilson2-4/+14
If called directly (e.g. via /etc/ld.so.preload) put the output trace into a central directory, and not the pwd.
2008-11-04[test] Add jpeg.jpg to EXTRA_DISTChris Wilson1-0/+1
Forgot to add the new file to the distribution with the previous commit.
2008-11-04[test] Update mime-data jpeg reference data.Chris Wilson5-3/+3
<adrianj> ickle_: If we are going to use a different image for jpeg in mime-data maybe we could create a jpg that contains the text "jpeg". That way when support for the other image formats is added the mime-data test could have one image for each type with each image and it is easy to see that each image is the correct one.
2008-11-04[test] Use a different jpeg image for mime-dataChris Wilson5-1/+8
Detect when we successfully encode the JPEG data from the mime-type by using a completely image.
2008-11-04[test] Adapt pdf-mime-data for non-srcdir build.Chris Wilson2-13/+33
Need to look for reference/input images from srcdir as well.
2008-11-04[test] Fix compilation of imagediff.Chris Wilson2-1/+19
imagediff broke once again.
2008-11-04[mime-type] Request the mime-data for the source surface, not ourselves!Chris Wilson2-4/+3
Fixup a typo I introduced that caused us to request the jpeg data for the destination surface and not the source.
2008-11-04[png] Use RGB for opaque images.Chris Wilson1-4/+7
If the ARGB32 is opaque, discard the alpha channel - so we should generate byte identical output to the reference images.
2008-11-04PS: Implement JPEG embeddingAdrian Johnson1-3/+101
2008-11-04Add pdf mime data testAdrian Johnson2-0/+153
To test that images in PDF files correctly embedded the mime data.
2008-11-04[win32] Compile fix for extend-pad extents.Chris Wilson2-2/+4
Update the show_glyphs() prototype to include the extents argument.
2008-11-04[trace] Convert [1 0 0 1 0 0] to identityChris Wilson1-9/+25
Simplify the trace/replay by replacing the identity array with the identity operator.
2008-11-04[trace] Remove more @..@ from Makefile.amChris Wilson1-6/+6
Use $(..) for make variable substitution as opposed to incorrectly using @..@ for substitution by configure.
2008-11-04[aclocal.dolt.m4] Fix build with bash versions <= 3.0 (bug #18363)Behdad Esfahbod1-1/+1
2008-11-03[mime-data] Copy a reference to the mime-data on snapshotting.Chris Wilson4-47/+66
Instead of doing a full-copy of the mime data (which can be 10K-100K, or even larger) just copy a reference to the original mime to the snapshot surface (as suggested by Behdad).
2008-11-03[trace] Install cairo-trace.so into $(libdir)/cairoChris Wilson2-6/+14
Install the auxiliary library into the cairo subdirectory within the lib path, so that it doesn't clutter $(libdir) and sets a precedent for future auxiliary libraries.
2008-11-03[configure] Make trace consistent.Chris Wilson2-6/+5
Remove the debianism from the comments for HAVE_BFD and comply with Behdad's guidelines on using $(...) within Makefile.am.
2008-11-03[test] Update extend-pad.Chris Wilson7-31/+200
extend-pad was not a clear demonstration of the EXTEND_PAD mode, so revamp it to show the filter extending a 4 pixel surface to cover the entire output. However, this hides a discrepancy with the vector surfaces that we cannot prevent the external renders from applying an interpolation to the border pixels, so we copy the original test to extend-pad-border to check the desired behaviour on boundary pixels.