summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-15svg: show_text_glyphs supportsvg-textTatsuhiko Miyabe4-47/+549
2012-06-15image: Fix up glyphs compositingChris Wilson1-36/+24
Jose Dapena Paz reported an assertion following the uninitialised status value being returned. Also the function failed to free its allocations. Based on a patch by Jose Dapena Paz <jdapena@igalia.com>. Reported-by: Jose Dapena Paz <jdapena@igalia.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51104 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-14subsurface: Disable subsurface-set-snapshot as it creates a ref cycleHenry Song1-0/+6
_cairo_surface_subsurface_set_snapshot () sets the subsurface as the snapshot of its target. This creates a reference cycle (as the target is already referenced by the surface) and thus a memory leak (assuming the likely case that user doesn't call finish). Test case: subsurface-similar-repeat. So make this call as a no-op for the time being until the bug is fixed.
2012-06-14quart-image: Fix compilationAndrea Canciani1-1/+1
quartz-image uses _cairo_surface_is_image(), which is now declared in cairo-image-surface-inline.h. Fixes: cairo-quartz-image-surface.c: In function 'cairo_quartz_image_surface_create': cairo-quartz-image-surface.c:312: error: implicit declaration of function '_cairo_surface_is_image' cairo-quartz-image-surface.c:312: warning: nested extern declaration of '_cairo_surface_is_image'
2012-06-09Use the new pixman_glyph_cache_t API that will be in pixman 0.28.0Søren Sandmann Pedersen5-249/+121
This new pixman API allows glyphs to be cached and composited in one go, which reduces overhead compared to individual calls to pixman_image_composite_region32(). Notes: - There is an explicit call to _cairo_image_scaled_glyph_fini(). This could instead be done with a private, but I chose not to do that since we don't need to store any actual data; we only need notification when the glyph dies. - The slowdown in poppler-reseau is real and stable across runs. I'm not too concerned about it because this benchmark is only one run and so it is dominated by glyph cache setup costs and FreeType rasterizing. Performance results, image backend: Speedups firefox-talos-gfx 5571.55 -> 4265.57: 1.31x speedup gnome-terminal-vim 1875.82 -> 1715.14: 1.09x speedup evolution 1128.24 -> 1047.68: 1.08x speedup xfce4-terminal-a1 1364.38 -> 1277.48: 1.07x speedup Slowdowns poppler-reseau 374.42 -> 394.29: 1.05x slowdown Performance results, image16 backend: Speedups firefox-talos-gfx 5387.25 -> 4065.39: 1.33x speedup gnome-terminal-vim 2116.66 -> 1962.79: 1.08x speedup evolution 987.50 -> 924.27: 1.07x speedup xfce4-terminal-a1 1856.85 -> 1748.25: 1.06x speedup gvim 1484.07 -> 1398.75: 1.06x speedup Slowdowns poppler-reseau 371.37 -> 393.99: 1.06x slowdown Also bump pixman requirement to 0.27.1.
2012-06-08polygon-reduce: Reduce broken stopped-edge continuationChris Wilson1-105/+52
This is hopefully a lesser used path and the attempted optimisation to continue a stopped edge with a colinear stopped edge highly unlikely and lost in the noise of the general inefficiency of the routine. As it was broken, rather than attempt to rectify the "optimisation" remove it. Reported-by: Evangelos Foutras <evangelos@foutrelis.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50852 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-08tor-scan-converter: Always recompute min-height following edge removalChris Wilson1-3/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-08spans-compositor: After polygon intersection the fill rule is always non-zeroChris Wilson1-0/+2
As it turns out due to the rules of polygon intersection, there is never any overlapping spans so the choice is arbitrary. However, lets be consistent with the rest of the code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-07scaled-font: Take lock around disposing of an empty page upon alloc failureChris Wilson1-0/+2
Spotted by code inspection whilst looking at #50705 References: https://bugs.freedesktop.org/show_bug.cgi?id=50705 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-07cff-subsetting: Ignore charset for non cid fontsAdrian Johnson1-7/+9
Fixes crash in https://bugzilla.gnome.org/show_bug.cgi?id=677422
2012-06-04composite-rectangles,scaled-font: Use accurate extents if the font is brokenChris Wilson3-4/+14
If the font metrics appear broken, i.e. key values are being reported as zero, skip approximating the bbox of the glyph string. References: https://bugs.freedesktop.org/show_bug.cgi?id=50688 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-02pdf: fix the offset of padded imagesAdrian Johnson2-6/+12
Bug 50598
2012-06-01Erradicate internal use of cairo_surface_get_type()Chris Wilson5-8/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-01Erradicate internal use of cairo_surface_get_content()Chris Wilson5-9/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-01image: Fix bugs related to glyph mask creationSøren Sandmann Pedersen1-2/+2
In addition to fixing a bug 7d8d98b91ccf7165be853c36e6d5ef releated to expanding a8 glyphs into a8r8g8b8, this commit also added an optimization where if the first glyph had format a8r8g8b8, the mask was created in this format from the beginning instead of later converting from a8 to a8r8g8b8. However, the optimization had two bugs in it: (1) The computed stride was 3 * width, not 4 * times width, and (2) In the case where the mask was allocated on the stack, it was allocated as PIXMAN_a8 and not a8r8g8b8. The commit fixes both bugs.
2012-05-31surface: replace map-to-image clone's use of user_data with parent pointerChris Wilson3-14/+7
Removes an another undeclared PLT entry and prevents mixing of user_data with internal state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31gl: Add missing cairo-private to _cairo_gl_composite_with_clipChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31surface: Eliminate PLT entries for map-to-imageChris Wilson1-4/+12
Use the internal symbols internally. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31image: silence make checkChris Wilson3-3/+4
The check for standalone headers requires that the cairo-image-surface-inline.h include the cairo-surface-private.h Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31gl: Do correct translation and lerp in gl-traps-compositor.Chuanbo Weng1-8/+14
Coordinate translation is necessary in composite_boxes(), composite() and composite_traps(). The translation value should set to correct value in traps_to_operand(). Also fix the bug in lerp().
2012-05-31image: Upconvert glyphs through a WHITE source when adding to the glyph maskChris Wilson1-19/+55
We need to scale the channels of the glyph into the destination (and indeed expand a8 into a8r8g8b8) when adding into the mask. Normally we have matching formats for the glyph surfaces and the temporary mask, for which we can continue to take the faster path. Reported-by: Søren Sandmann <sandmann@cs.au.dk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31pdf: Don't use extents when acquiring a RASTER_SOURCE patternAdrian Johnson1-13/+4
because the pdf surface reuses the image each time the pattern is used.
2012-05-31test: Restore bug-seams referenceChris Wilson2-0/+0
An overzealous update after converting antialiasing missed the object of this test was exactly to point out an error due to the antialiasing. So restore it back to the prestine reference and mark the image backend as failing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-30configure.ac: remove annoying change of INSTALL fileYuanhan Liu1-1/+1
Every time we run ./autogen.sh, the INSTALL file would be replace by /usr/share/automake-1.11/INSTALL, which changes the file. This is very annoying since it messes up the result of 'git diff' and git always wants to commit it. Declare it as foreign would fix this annoying issue. Since it's not a GNU project, it makes sense to do so. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2012-05-30gl: Do no access ctx after release during map-to-imageChris Wilson1-8/+8
Based on a patch by Yuanhan Liu. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-30gl: use _cairo_gl_operand_copy to fix unblanced reference countYuanhan Liu1-2/+2
Use _cairo_gl_operand_copy to do the operand copy instead of by something like *operand = surface->operand. This would fix a crash introduced by operator-source test case, which forgot to do reference while copying operand but did dereference while destroying surface at combine_clip_as_traps(). Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> [ickle: drop the extra reference for the owned surface] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-27pdf: merge _emit_recording_surface and _emit_recording_subsurface into the ↵Adrian Johnson1-86/+26
one function
2012-05-27ps: check if EXTEND_PAD group can be painted with EXTEND_NONEAdrian Johnson1-6/+25
2012-05-27pdf: fix smask gradient bboxAdrian Johnson1-3/+26
2012-05-26surface: Kill imagesurf temporary variableChris Wilson1-14/+5
The local alias to &image->base is more confusing that the code it replaces. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-26image: Propagate errors from clone_subimageChris Wilson1-7/+19
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-26quartz: Provide a valid implementation of map_to_imageAndrea Canciani1-132/+71
and reuse it to implement acquire_source. Fixes cairo-quartz-surface.c: In function '_cairo_quartz_surface_map_to_image': cairo-quartz-surface.c:1568: warning: return from incompatible pointer type cairo-quartz-surface.c:1576: warning: return from incompatible pointer type
2012-05-26quartz: Mark surfaces created clear as is_clearAndrea Canciani1-0/+3
This might provide a speedup when clearing an already clear surface and is required by cairo_surface_create_similar(). Fixes zero-mask.
2012-05-26quartz: Silence warningAndrea Canciani1-2/+3
cairo-quartz-surface.c:177: warning: enumeration value 'CAIRO_FORMAT_RGB30' not handled in switch
2012-05-26surface: Use the internal map/unmapAndrea Canciani6-44/+46
In many places Cairo maps/unmaps surfaces to perform operations on the raw image, but it doesn't care about the format being invalid. All of these are appropriate users of _cairo_surface_map_to_image().
2012-05-26surface: Only use non-NULL extents for internal mappingAndrea Canciani2-4/+14
_cairo_surface_map_to_image() requires the input extents to be non-NULL.
2012-05-26surface: Make backend-specific map/unmap functions symmetricAndrea Canciani11-47/+48
Map allocates a surface. Symmetrically, unmap should destroy it.
2012-05-26surface: Make map_to_image return cairo_image_surface_t*Andrea Canciani17-39/+51
This makes it easier to check that the funciton is returning the correct type of surfaces.
2012-05-26surface: Define private map/unmap functionsAndrea Canciani4-73/+222
Cairo backends often need to map/unmap to a raster surface but they don't care about the pixel format, as Pixman will be doing the format handling. Cairo users cannot know how to access the raw data if the format is invalid. The two different scenarios call for different guarantees on the returned surface. The private map/unmap functions also makes it possible to simply return the status upon unmapping.
2012-05-26png: Implement conversion of CAIRO_FORMAT_RGB30 to stringAndrea Canciani1-0/+1
Fixes png.c:55: warning: enumeration value ‘CAIRO_FORMAT_RGB30’ not handled in switch
2012-05-26build: Do not replace existing filesAndrea Canciani1-1/+1
The existing INSTALL file is currently being replaced at every autogen.sh run with the default one. This is not desired, because INSTALL contains some cairo-specific information.
2012-05-26build: Allow autogen-eration on systems without GTK-docAndrea Canciani1-3/+3
The autogen.sh script fails if it cannot run gtkdocize. The absence of this command should not cause cairo builds to fail, it should only prevent the build of its documentation. Fixes: *** No GTK-Doc found, please install it *** on systems without gtkdoc tools. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50356
2012-05-24gl: Use core GL_STENCIL8_DEPTH24 for gl_flavor=desktopChris Wilson1-1/+1
Jesse complained that --enable-gl --enable-glesv2 wasn't pulling in the right headers, and in particular GL_STENCIL8_DEPTH24_OES was undefined but being used. In this case we can simply use the identical GL_STENCIL8_DEPTH24 instead. Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23gl: Fix compilation failure for flush cleanup.Martin Robinson1-2/+2
2012-05-23gl: Simplify switching between primitive typesHEADmasterMartin Robinson3-34/+41
Simplify the code that switches between primitive types by adding a new member to the context which tracks the currently active primitive type.
2012-05-23test: Increase surface size for get-path-extentsChris Wilson1-1/+1
Whilst generating a glyph run from a string, any glyphs that are far outside the surface (including a substantial guard region) are culled. This affects the path extents. Workaround this by increasing the surface size. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23test/record90: Rotate the reference so that it is wholly visibleChris Wilson4-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23test: Refresh unbounded-operatorChris Wilson2-0/+0
Apparently this too suffered from bug-bo-collins and is fixed by (bo-rectangular: Emit subsummed boxes for overlapping edges). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23bo-rectangular: Emit subsummed boxes for overlapping edgesChris Wilson1-2/+3
Fixes bug-bo-collins Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49446 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23test: Exercise rectangular bo bugChris Wilson3-0/+77
Reported-by: S. Christian Collins <s_chriscollins@hotmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49446 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>