Commit graph

10314 commits

Author SHA1 Message Date
Chris Wilson
94a9e06a93 clip: Intialise polygon fill-rule prior to use
The earliest use of the clip path's polygon fill rule is now for
intersecting the original polygon with the plurality of clip boxes.
However, the initialisation of the fill rule remained after the
intersection.

==8968== Conditional jump or move depends on uninitialised value(s)
==8968==    at 0x4C99449: _cairo_polygon_intersect (cairo-polygon-intersect.c:1382)
==8968==    by 0x4C9B788: _cairo_polygon_intersect_with_boxes.part.12 (cairo-polygon-intersect.c:1520)
==8968==    by 0x4C6AE6E: _cairo_clip_get_polygon (cairo-clip-polygon.c:104)
==8968==    by 0x4CAA667: clip_and_composite_boxes.part.13 (cairo-spans-compositor.c:773)
==8968==    by 0x4CAAD1D: clip_and_composite_boxes (cairo-spans-compositor.c:758)
==8968==    by 0x4CAB25C: _cairo_spans_compositor_fill (cairo-spans-compositor.c:1023)
==8968==    by 0x4C6CB69: _cairo_compositor_fill (cairo-compositor.c:184)
==8968==    by 0x4C7CE3E: _cairo_image_surface_fill (cairo-image-surface.c:945)
==8968==    by 0x4CAE2B6: _cairo_surface_fill (cairo-surface.c:2047)
==8968==    by 0x4C74AB7: _cairo_gstate_fill (cairo-gstate.c:1268)
==8968==    by 0x4C6E6D3: _cairo_default_context_fill (cairo-default-context.c:1009)
==8968==    by 0x4C67944: cairo_fill (cairo.c:2105)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 18:49:19 +00:00
Chris Wilson
ea0703524f image: Support SRC compositing with in the inline span-compositor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 18:49:19 +00:00
Chris Wilson
e0be011207 skia: Setup opacity for cairo_paint_with_alpha()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 12:05:26 +00:00
Chris Wilson
f7897e7cbd version: Post-release version bump to 1.11.5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 10:11:17 +00:00
Chris Wilson
a8dbc68056 version: Bump for snapshot 1.11.4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 09:26:07 +00:00
Chris Wilson
49f03c2738 test: Restore 'release-verify-sane-tests' makefile target
Empty for the moment as there is no need to cross-reference the files in
git against the list in the Makefile anymore, but the release process
still requires it - and it may prove to be useful again in the future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 09:26:07 +00:00
Chris Wilson
ab0e224b99 skia: compile fix
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10 10:46:50 +00:00
Chris Wilson
f7d4653c1b stroke: Do not initialise the pen if will not use it
The pen is only used for ensuring that we generate consist vertices
around a fan used for end-capping or line-joining when set to ROUND.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10 10:46:50 +00:00
Chris Wilson
5ff689c017 mono-scan-converter: Use edge->is_vertical flag
The earlier bug found in edge advancement was actually due to the missed
opportunity of not performing the increment when we know the step is
zero.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10 10:46:50 +00:00
Chris Wilson
07b540fd35 bentley-ottmann: Sort by edge bounding boxes before computing x
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10 10:46:50 +00:00
Chris Wilson
247c42357c bentley-ottmann: Skip intersection check if the bounds do not overlap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10 10:46:49 +00:00
Chris Wilson
2ab171467b hash: Keep a simple lut in front of the main hash
Whilst we wait for IvyBridge with its fast integer divide, in the
meantime avoid the overhead by inspecting a smaller simpler cache before
doing the full hash table lookup.

Shaves around 10% off glyph microbenchmarks for -image.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10 10:46:49 +00:00
Nis Martensen
002a3d8b95 doc: fix broken link
cairo_win32_scaled_font_create_for_logfontw() does not exist. Probably
cairo_win32_font_face_create_for_logfontw() was meant instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:30 +01:00
Nis Martensen
ed89a3eeb0 doc/xcb: document cairo_xcb_device_get_connection
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:30 +01:00
Nis Martensen
e44186fdfe doc/xlib/xcb: document get/set_precision API
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
423990ba70 doc/ps-surface: minor improvements
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
70af9e6851 doc/ft-font: add reference to cairo_ft_synthesize_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
f22ecd3568 doc: describe cairo_recording_surface_get_extents
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
2184bd6672 doc: avoid confusing gtk-doc by double asterisks
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
6d2582a22a doc: move value descriptions up
to make gtk-doc happy

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
16d6b938c8 doc: ensure "compatibility" spelling
This changes not only comments, but also code!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
6ce412e15a doc: symbol names in header and comment must match
The names of the function arguments in the function prototype and
in the description comment must match, otherwise gtk-doc is confused.
When the argument names differ between function prototype and
definition, use the names from the prototype.

Also add a missing colon.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
b42270a3f1 doc: preserve whitespace by using docbook screen tag
Using the programlisting tag is not appropriate everywhere. Use the
screen tag where the formatting shall be preserved and the text is no
code listing.

Also add whitespace to prevent gtk-doc from inserting paragraph breaks.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:29 +01:00
Nis Martensen
77da76ac6c doc: fix a few typos found by codespell
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
4a1d420558 doc: script_mode_t needs at least one line of text
Gtk-doc recognizes documentation only if there is additional text.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
344d62b011 doc: Add colon to Returns statement
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
6b2d12e78a doc: do not confuse gtk-doc by @ and double *
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
e1c9e7acfc doc: add missing _face to function names
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
95ba71812d doc: add colon to .._padded_image_from_image
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
914448c304 doc: add index of new symbols in 1.12
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
acf50966e6 doc: typo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Nis Martensen
4353eafa32 doc: add missing colons to since tags
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-10 10:20:28 +01:00
Chris Wilson
c0eaaa1680 test: Refresh the fallback-resolution reference images
Despite copying across the font options from the PDF backend, it still
looks like the image surface is override the glyph placement... Odd.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-08 15:32:39 +00:00
Chris Wilson
1952fec829 surface: Relax assertion about not rendering to a snapshot
Recently I began using the surface->snapshot_of member of a subsurface
to cache a target representation of the current subsurface. More
recently, I discovered this caused an assertion failure in epiphany, and
probably other GTK3 based programs.

Throwaway the assertion and trust that the programmer doesn't make any
mistakes...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-08 15:20:21 +00:00
Martin Robinson
04108ce492 gl/msaa: Do not attach a depth-stencil attachment to the default framebuffer
Only texture surfaces need to have a depth-stencil attachment.
The default framebuffer is responsible for managing its own
depth and stencil attachments.
2012-03-07 00:02:52 +00:00
Chris Wilson
3454604459 xlib: Apply the glyph offset
The (dst_x, dst_y) parameters passed to the XRenderCompositeText are
misleading and do not perform any adjustment, so we have to do it
ourselves.

Fixes clip-operator

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 21:13:20 +00:00
Chris Wilson
ad758280b6 traps: The CompositeTrapezoids requires the unbounded fixup for clipping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 21:13:17 +00:00
Chris Wilson
753007ea00 traps: Avoid double application of unaligned clip boxes
Both combine-with-clip functions now take care of any intersection with
clip boxes so the result would be to have overdrawn the unaligned clip
box mask twice.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 21:13:17 +00:00
Chris Wilson
d40b90a577 clip: Use the boxes-intersection routine for computing the clip polygon
If we have more than a single box, run the boxes intersection as a
post-processing step on the clip polygon, as it should be faster than
doing it inline.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 15:00:53 +00:00
Chris Wilson
f8f0510f89 image: Add unbounded support to the mono rasteriser fast-paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 14:42:19 +00:00
Chris Wilson
5bd29eda63 surface-wrapper: Only apply the wrapped transform to the scaled-font
And not the device_transform of the target. This smells fishy, but
appears to make the test suite happy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 14:11:49 +00:00
Chris Wilson
c65ed9c79d image: Try performing span composition a row at a time
In theory, this should be more cache efficient and allow us to trim the
operation to the width of row, shaving a few texel fetches. The cost is
that we cause pixman to evaluate the composite operation per-row. This
should only be a temporary solution until we can do something better
through pixman...

On a i5-2520m, ymmv,

  firefox-fishtank  64585.38 -> 56823.41:  1.14x speedup
  swfdec-fill-rate   1383.24  -> 1665.88:  1.20x slowdown

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-05 17:06:35 +00:00
Chris Wilson
c19bf1499a image: Add a simple inplace blitter for spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-05 17:06:02 +00:00
Chris Wilson
9f83ac5c63 image: Perform the simple solid-fill spans inplace
Reducing the number of passes has the usual change in the antialiasing
side-effects, as well as the boon of being faster (and theorectically more
accurate through reduced loss of dynamic range.)

On an i5-2520m:
    swfdec-giant-steps-full   3240.43  ->  2651.36:  1.22x speedup
             grads-heat-map    166.84  ->   136.79:  1.22x speedup
         swfdec-giant-steps    940.19  ->   796.24:  1.18x speedup
                  ocitysmap    953.51  ->   831.96:  1.15x speedup
        webkit-canvas-alpha  13924.01  -> 13115.70:  1.06x speedup

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-05 17:03:53 +00:00
Chris Wilson
e572ae253a spans: Handle fallbacks from upload-boxes by reverting to the normal composite
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-05 12:02:31 +00:00
Chris Wilson
ac80097a31 traps: First attempt to convert curvy unantialiased polygon to scanlines
If we have a curvy polygon, we can expect to generate lots of short
trapezoids. However, we may be able to reduce the transport size by
converting them into a set of boxes instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-04 22:54:02 +00:00
Chris Wilson
c45822886a traps: Use the mono-scan-converter to reduce the number of traps
This trick only seems effective with mono-rasterisation, with a win of
about 10% for tiger-demo --antialias=none. At other antialias setting,
performance is reduced.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-04 22:54:02 +00:00
Chris Wilson
38a242a380 spans,image,gl: Add fast-path for simple copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-04 22:54:02 +00:00
Chris Wilson
aed5a1cf1e spans: Reduce composite_aligned_boxes with over to source for opaque patterns
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-04 22:54:02 +00:00
Chris Wilson
cc13379ee3 image: Add a fast-path for mono-rasterised blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-04 22:54:02 +00:00