Commit graph

8071 commits

Author SHA1 Message Date
Andrea Canciani
35f19bc084 pattern: Fix _gradient_is_opaque() for zero stops
_gradient_is_opaque() previously returned TRUE for gradient with
no stops, triggering a false optimization in _cairo_gstate_mask().

Fixes test/gradient-zero-stops-mask

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-31 12:52:09 +02:00
Andrea Canciani
01e1821942 test: Add gradient-zero-stops-mask
Add a test to check that gradient with no stops are not considered
opaque by gstate (and thus masking with them is not optimized to
paint).
2010-03-31 12:14:25 +02:00
Chris Wilson
ce3ad6f41e xlib: Avoid multiple evaluations inside bswap_*() macro.
Fixes:
  Fonts are not readable if remote display to a machine with different
  endian.
  https://bugzilla.mozilla.org/show_bug.cgi?id=526977

Reported-and-tested-by: Ginn Chen <Ginn.Chen@Sun.COM>
2010-03-31 08:21:17 +01:00
Chris Wilson
be4ffa9df2 doc: Fix some missing '%' in gtk-doc comments 2010-03-30 18:31:38 +01:00
Chris Wilson
7ab350378e Silence enumeration warnings following addition of RGB16_565 2010-03-30 18:31:34 +01:00
Chris Wilson
d901692a55 scaled-glyph: Allow removal info fields.
Pushed a fraction of a second too soon... Update the
scaled_glyph->has_info if the backend clears any field as well.
2010-03-30 15:31:32 +01:00
Chris Wilson
5c4b6d520b xcb: Cache whether we have already check a glyph for size.
Avoid repeated cairo_scaled_glyph_lookup() and checking of sizes if we
have already seen this glyph in this run.
2010-03-30 15:28:37 +01:00
Chris Wilson
1c76e3e9ad scaled-font: Optimize cairo_scaled_font_lookup()
By tracking which fields of information are already available on the
scaled_glyph we can more efficiently determine if we already have the
requested fields. This reduces from about 6 conditionals to one, and
reduces the function overhead by ~20% -- which has a measurable
improvement on glyph benchmarks.
2010-03-30 15:28:37 +01:00
Chris Wilson
d2ec151e49 perf/micro: Exercise different sizes and antialising modes with glyphs 2010-03-30 15:28:37 +01:00
Chris Wilson
72481acf0d perf: Compute ops per second
Provide a hook for the test to be able to compute the number of ops per
second. For instance, the glyphs test uses it to report the number of
kiloglyph per second Cairo is able to render.
2010-03-30 15:28:37 +01:00
Chris Wilson
2a98d0586c drm/i915: Avoid using another unpreserved temporary
As we may load from a sampler, we can not use on of the unpreserved
temporaries to store the intermediate colour result.
2010-03-28 18:49:16 +01:00
Chris Wilson
26f963557b drm/i915: Normalize spans opacity value
On the generic path I forgot to rescale the alpha value into [0,1].
2010-03-28 18:49:16 +01:00
Chris Wilson
97f8c20727 boilerplate: Create an image16 target
In order to exercise the newly restored r5g6g5 support, we need to
create an appropriate surface and feed it through the test and
performance suites.
2010-03-27 21:53:55 +00:00
Oleg Romashin
022291be1c Add back support for CAIRO_FORMAT_RGB16_565
Due to slow memory speed, 16bpp color depth is still very popular on mobile
devices. Maemo5 is also using 16bpp color depth.
2010-03-24 13:12:25 -04:00
Chris Wilson
36e12b1952 subsurface: Ignore return from _cairo_clip_init_copy()
The return is just a hint that the clip is empty, however we are about
to immediately apply the surface clip and so do not care for an
'optimised' path.
2010-03-24 12:14:20 +00:00
Chris Wilson
e356e5d18b recording: Fix leak of clip from snapshots of recording surfaces. 2010-03-24 11:38:19 +00:00
Chris Wilson
5b4885f693 clip: propagate the no-clip through the copy. 2010-03-24 11:25:29 +00:00
Chris Wilson
b3e0393161 clip: Don't reduce all-clip to no-clip. 2010-03-24 11:21:36 +00:00
Chris Wilson
b12114f296 snapshot: Finish the clone.
Kill ref cycles from snapshots patterns by explicitly calling finish on
the cloned surface.
2010-03-24 11:08:38 +00:00
Chris Wilson
db913d731e xcb: Ensure that we own the glyph cache before use.
Sigh. One day, I will enable multiple glyph caches to be attached to a
scaled font, but for today, simply avoid the crash.
2010-03-24 10:16:58 +00:00
Chris Wilson
6da3cea356 scaled-font: Destroy the old surface when replacing scaled_glyph->recording 2010-03-23 20:53:11 +00:00
Chris Wilson
548092fe8c script: Free the surface/font bitmaps. 2010-03-23 20:08:36 +00:00
Chris Wilson
83d1bd9f37 script: Manually unlink font entries upon destruction
As the device is already finished, we can not lock it without raising an
error, so we have to open code the destruction of the font entries.
Fortunately we can make several simplifying assumptions about the
required cleanup as we know the device is also being destroyed.
2010-03-23 20:04:10 +00:00
Chris Wilson
cccf6753ab script: More acquire device fixes.
We also need to acquire the device upon finish, similar surface creation
and the pagination functions, i.e. the other times outside of the
drawing ops that must modify the shared context/device.
2010-03-23 19:45:35 +00:00
Chris Wilson
25a77b263d boilerplate: Cleanup the list of backends upon shutdown. 2010-03-23 16:49:21 +00:00
Chris Wilson
1ddcd5cf31 clip: Remove the redundant _cairo_clip_init_rectangle()
As _cairo_clip_init_rectangle() is equivalent and more importantly more
clearly written as:
  _cairo_clip_init(&clip);
  if (status = _cairo_clip_rectangle(&clip, &rect)) {
     _cairo_clip_fini(&fini);
     return status;
  }
perform the transformation and in the process catch a few mistakes along
error paths.
2010-03-23 16:43:39 +00:00
Chris Wilson
61ad28fe7d device: Add language binding interfaces.
Damien Carbonne reported that cairo_device_t lacked the language binding
hooks normally associated with cairo objects. So add the missing
get_reference_count, get_user_data and set_user_data.
2010-03-23 10:44:16 +00:00
Chris Wilson
8a8c2f6c28 cairo: Typos in docs.
A couple of typos reported by Damien Carbonne.
2010-03-23 10:35:17 +00:00
Chris Wilson
4c55c87478 image: Free traps after conversion from boxes. 2010-03-23 10:35:17 +00:00
Chris Wilson
07f7bddc30 xcb: Free traps after conversion from boxes. 2010-03-23 10:35:13 +00:00
Chris Wilson
181403fb53 test/clear-source: Free source after use. 2010-03-23 09:38:59 +00:00
Chris Wilson
35432e37c2 xcb: Destroy reference to clip surface after use. 2010-03-23 09:35:51 +00:00
Chris Wilson
98e3dfbb89 xcb: Relinquish the xcb connection on finish. 2010-03-23 09:35:31 +00:00
Chris Wilson
638cae3bde xcb: Fix leak of clip rectangle during show-glyphs. 2010-03-23 08:25:13 +00:00
Chris Wilson
1d4ad78774 test/pthread-same-source: Free source after use. 2010-03-23 08:20:49 +00:00
Chris Wilson
bfc027ac6d test/clip-image: Free image after use. 2010-03-23 08:16:57 +00:00
Chris Wilson
e214f09d63 xcb: Consume the implicit reference for the cached connection on finish 2010-03-22 22:20:58 +00:00
Chris Wilson
c235543bdf xcb: Destroy reference to local source picture in show-glyphs. 2010-03-22 22:15:44 +00:00
Chris Wilson
c42cdd2c9d xcb: Gracefully destroy any lingering fallback during finish.
A fallback should never persist beyond the flush into the finish, but
yet one remains in test/clip-shapes-unaligned-rectangles. For the time
been, simply clean up the rogue surface.
2010-03-22 20:14:09 +00:00
Chris Wilson
fd96aa3de2 gl: Hook in glyph cache finalisation. 2010-03-22 19:07:31 +00:00
Chris Wilson
c7511fa7ad drm/intel: Revoke glyph caches on device finish 2010-03-22 17:21:38 +00:00
Chris Wilson
9ba73bdfc4 gl: Decouple cache from scaled-font on context destruction 2010-03-22 17:17:08 +00:00
Chris Wilson
7812d095ab drm/intel: Replace open-coding of _cairo_rtree_node_remove() 2010-03-22 16:46:58 +00:00
Chris Wilson
48d8471625 recording: Cleanup the clip on error.
Whilst recording the commands, remember to cleanup the local clip after
detecting an error.
2010-03-22 13:05:23 +00:00
Chris Wilson
c87737c2bf ps: Skip surface emission if in error state.
During finish, if we encountered an error during the construction of the
surface, simply proceed to cleanup rather than emit the incomplete and
potentially subtly broken output.
2010-03-22 13:04:19 +00:00
Chris Wilson
e961cdf568 image: Special case wholly unbounded fixups.
In the event of an empty bounded rectangle, the computation of the
unbounded - bounded rectangles leads to negative areas, integer overflow
and death.

[And similarly for the derived surfaces.]
2010-03-22 10:54:08 +00:00
Chris Wilson
844d8ea57d surface: Check pattern for error status.
Ensure that the error status from patterns is propagated when used by
doing so in the surface layer. Similarly check that a surface pattern
has not been finished.
2010-03-22 10:37:18 +00:00
Chris Wilson
213093f437 ps: Free page on error path. 2010-03-22 10:36:47 +00:00
Chris Wilson
c8a8e57d6a script: Use a stack to push/pop recursed line numbers.
Still not entirely helpful in the event of recursive parsing without a
reference to the file as well as the line number in the event of an
exception.
2010-03-21 20:42:34 +00:00
Chris Wilson
4b4de940ee script: Remove the version check.
When compiling we can depend on whatever version of cairo we need, but
we should be wary of checking for runtime compatibility when building
standalone.
2010-03-21 20:41:18 +00:00