Commit graph

10281 commits

Author SHA1 Message Date
Henry Song
bc97bcf0ef gl: use direct mode for uploading gradient texture
The gradient is relatively small and any differences between upload
methods should be hidden by the caching. As it stands, using pbo with
the gradient fails with fglrx. As the workaround to use a simple
TexImage2D is inconsequential (may even be a minute win) and simplifies
the code, just do it.
2012-03-22 23:13:30 +00:00
Chris Wilson
02e3b6bc80 directfb: Tweak, tweak, tweak.
A couple of mistakes, such as inverting the logic as to when to flush
damage back from the shadow, meant that nothing happened when drawing to
the directfb surface.

Again still only compile tested.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 14:27:31 +00:00
Chris Wilson
be8a5f13b7 win32: Remove obsolete font rendering routines
These are now done by cairo-win32-gdi-compositor.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 12:28:46 +00:00
Chris Wilson
28b3831223 win32: Hook up glyph creation again
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 12:28:46 +00:00
Chris Wilson
9bb5b02694 win32: Fix damage flushing
The damage wasn't being created on the right surface, so the damage to
the fallback image surface was not being tracked. Perform a little bit
of juggling so that we track dirty regions on the fallback surface itself.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 20:09:52 +00:00
Chris Wilson
c504dba5a7 damage: Fix memcpy size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 20:09:52 +00:00
Chris Wilson
eafa127001 compositor: Add tracing for damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 20:09:52 +00:00
Chris Wilson
86a89a8c1d win32: Check for damage before blitting
During the surface flush, we reduce any pending damage and then blit. If
no damage had been accrued then the damage->region would be NULL leading
to a segfault.

Patch suggested by Szuromi Gábor.

Reported-by: Szuromi Gábor <kukkerman@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47605
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-20 19:16:36 +00:00
Chris Wilson
0a778d974f stroke: Adapt rectilinear stroker to handle separable non-unity scaling
Reported-by: Christos Sotiriou <csotiriou@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 20:02:50 +00:00
Henry (Yu) Song
1e4f385dec boilerplate/gl: set width and height to be at least 1 2012-03-19 11:01:47 +00:00
Dongyeon Kim
a473c03567 trace: Wrap GL surfaces 2012-03-19 10:36:08 +00:00
Chris Wilson
a3612610b1 gl: Manually invert images without MESA_pack_invert extension
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 10:36:08 +00:00
Kouhei Sutou
cc98926cde skia: add a missing header into archive 2012-03-19 10:28:56 +00:00
Chris Wilson
f5b5fad66e trace: Add breadcrumb for cairo_image_surface_get_data()
Just emit a marker for when cairo_image_surface_get_data() is called on
a surface so that we have a breadcrumb for when the pixels are first
exported. (Though note that pointer may be kept around and used much
later.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 11:58:51 +00:00
Henry (Yu) Song
efb2018309 scaled-font: Ignore empty glyphs when checking for potential overlap
A zero-sized box contains no pixels and so cannot overlap, but it does
still need to contribute to the extents.
2012-03-13 18:57:47 +00:00
Chuanbo Weng
91113a9e45 subsurface: Avoid potential crash when subsurface's size is less than 0
When cairo_surface_create_for_rectangle() is given non-integer parameters,
the subsurface's size may be negative(e.g x = 0.2, width = 0.7, the
final width will be -1). This illegal surface may cause crash somewhere
upon later use, and although the fractional subsurface is ill-defined,
we should never crash!
2012-03-13 11:19:23 +00:00
Chris Wilson
d67f02e23e spans-compositor: Only destroy the clip if we made the copy
The extents->clip may be replaced elsewhere and so we cannot assume that
simply because it changed from the stashed value, that it was us that
made that copy. So becareful to only free our copy.

Fixes a double-free of a clip after a complex fallback operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-13 11:16:39 +00:00
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