Commit graph

78 commits

Author SHA1 Message Date
Chris Wilson
0bfd2acd35 xlib: Implement SHM fallbacks and fast upload paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-17 13:58:09 +01:00
Chris Wilson
306117ea7c Split cairo-recording-surface-private into struct+inlines
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-19 12:51:03 +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
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
Chris Wilson
2061cd81f2 Replace the ad-hoc surface unwrappers with a function pointer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 13:01:17 +00:00
Chris Wilson
83bfd85a13 Implement cairo_backend_t
Allow a backend to completely reimplement the Cairo API as it wants. The
goal is to pass operations to the native backends such as Quartz,
Direct2D, Qt, Skia, OpenVG with no overhead. And to permit complete
logging contexts, and whatever else the imagination holds. Perhaps to
experiment with double-paths?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-15 11:05:19 +01:00
Chris Wilson
507b8abcf6 Excise xcb-drm
The experiment was at best a pyrrhic victory. Whilst it did show that
you could successfully subvert cairo_xcb_surface_t and provide the
rendering locally faster (than the xlib driver at that time), any
performance benefits were lost in the synchronisation overheads and
server-side buffer allocation.

Once cairo-gl is mature, we need to look at how we can overcome these to
improve client-side rendering

In the meantime, cairo-xcb is no longer my playground for
experimentation and is shaping up to become a stable backend...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-14 12:46:26 +01:00
Chris Wilson
5d9da3decf Excise DRM-Xr
I've since incorporated (nearly) all the features from cairo-drm into
xf86-video-intel, making this experiment defunct.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-14 12:35:19 +01:00
Andrea Canciani
4679b28e21 color: Remove unused functions
_cairo_color_init() and _cairo_color_init_rgb() are basically unused
(except in some experimantal code, which is trivial to fix).
2011-07-08 11:14:16 +02:00
Andrea Canciani
ab8c108b88 Do not warn when ignoring the return value of _cairo_rectangle_intersect()
gcc complains that

cairo-surface-wrapper.c:647: warning: ignoring return value of
‘_cairo_rectangle_intersect’, declared with attribute warn_unused_result

It can be silenced by making _cairo_rectangle_intersect()
cairo_private_no_warn. This makes it possible to avoid unused
temporary variables in other places and reduces the dead assignments
reported by clang static analyzer from 114 to 98.
2011-03-19 12:24:14 +01:00
Andrea Canciani
200e147322 pattern: Use double precision for gradient extreme objects
Using double precision for gradient extreme objects ensures that they
are preserved as specified when constructing the gradient pattern.

Fixes huge-linear, huge-radial.

Fixes part of https://bugs.freedesktop.org/show_bug.cgi?id=32215
2011-01-02 18:33:14 +01:00
Andrea Canciani
85a489f0f2 polygon: Merge _cairo_polygon_init and _cairo_polygon_limit
_cairo_polygon_limit() had to be called immediately after
_cairo_polygon_init() (or never at all).

Merging the two calls is a simple way to enforce this rule.
2010-12-10 11:04:48 +01:00
Chris Wilson
5f2e647dcf drm/intel: Drop the bo cache.
As this remains experimental, rely on the highly experimental kernel
caching...
2010-11-07 14:37:05 +00:00
Andrea Canciani
330b343952 drm: Do not access path flags directly
Fixes compilation
2010-10-30 11:26:13 +02:00
Benjamin Otte
e79acf47a5 subsurface: Make CAIRO_SURFACE_TYPE_SUBSURFACE public 2010-08-26 12:55:39 +02:00
Chris Wilson
679e5a600b Differentiate between reducing clip to composite extents and a rectangle
This is required for handling glyphs when rendering directly to the
surface.
2010-07-12 16:33:38 +01:00
Chris Wilson
1099a3515b drm/intel: Fix common off-by-one by rewriting the [XY]MAX macro.
Many rectangles in the command stream are specified as inclusive rects,
i.e. the max values are (width-1, height-1), which is easy to neglect.
2010-06-24 17:29:19 +01:00
Chris Wilson
fb6a00571c drm: _cairo_color_get_content() compilation fixes 2010-06-24 17:29:18 +01:00
Chris Wilson
dfa2544f15 color: Special case comparing color stops.
color stops are not premultiplied so we need to handle them carefully
when comparing. The next step will be to make cairo_color_stop_t a
unique type to prevent this mistake again.
2010-05-13 09:52:39 +01:00
Chris Wilson
cf0933a05a gallium: Refresh.
Catch up with changes in APIs, still no substance and the integration
with winsys handles needs review.
2010-05-12 20:54:49 +01:00
Chris Wilson
bd672d080c drm: code dump, sorry.
Lots upon lots of tiny fixes mixed in with experimental code. :(
2010-05-12 20:54:49 +01:00
Chris Wilson
c8fba49603 rtree: Remove the unused evict hook. 2010-05-12 20:54:49 +01:00
Chris Wilson
07122f37d1 surface: Convert snapshots from an array to a double-linked list.
Saves the memory allocation for the array, and the overhead of
maintaining the area for both insertions and more importantly deletes.
2010-04-30 10:16:23 +01:00
Benjamin Otte
95179a5de9 Remove excessive semicolons
s/;;/;/ basically
2010-04-29 20:45:23 +02:00
Andrea Canciani
d66b1ca1cf atomic: Separate bool and old-value compare-and-exchange
Some implementations only offer one version of compare-and-exchange,
thus we expose both through cairo-atomic, implementing what is missing
through appropriate fallbacks.
*_cmpxchg() now return a boolean (this unbreaks _cairo_atomic_uint_cmpxchg)
*_cmpxchg_return_old() return the old value
Code is updated everywhere to reflect this, by using *_cmpxchg()
wherever the returned value was only tested to check if the exchange
had really taken place.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-29 10:52:47 +02:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Chris Wilson
4d3632761b clip: Report the surface offset when retrieving the clip mask
Stop the callers from guessing the origin of the clip surface by
reporting it explicitly! This enables the clip to bypass any rectangles
overlaid on top of the clip surface, which is common when the backends
limit the clip to the extents of the operation -- but irrelevant to the
actual content of the clip mask
2010-04-25 09:45:41 +01:00
Benjamin Otte
2bffa2467e Use pixman_image_composite32()
Replace all occurences of pixman_image_composite()
2010-04-15 18:31:01 +02:00
Chris Wilson
7ab350378e Silence enumeration warnings following addition of RGB16_565 2010-03-30 18:31:34 +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
c7511fa7ad drm/intel: Revoke glyph caches on device finish 2010-03-22 17:21:38 +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
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
5fb36fe5ab drm/i965: Acquire device around commit. 2010-03-08 15:37:17 +00:00
Chris Wilson
f79b2ceea4 drm/i915: Discard redundant solitary clips during fill 2010-03-04 19:52:58 +00:00
Chris Wilson
7cea9ae290 drm/i915: Apply more micro-optimisations when targetting CONTENT_ALPHA 2010-03-04 17:23:55 +00:00
Chris Wilson
dce8b028cd drm/i915: Adjust clip matrix for clip origin. 2010-03-04 17:13:53 +00:00
Chris Wilson
8e702044b3 drm/i915: Handle clip/combine coords for spans. 2010-03-04 17:13:02 +00:00
Chris Wilson
afe6f4f051 drm/i915: Use a preserved temporary to store the radial texcoord. 2010-03-04 00:04:30 +00:00
Chris Wilson
4b2e047882 drm/i915: Eliminate redundant radial vertex shader.
It is always equivalent to a simple texture transformation, so reduce it
to the texture shader.
2010-03-04 00:04:30 +00:00
Chris Wilson
5161051798 drm/i915: Fix encoding of negated operand channels
Long ago when converting the pixel shader structs into macros and
reducing the code size by ~100k (the inlines were too depth for constant
propagation and CSE), I broke the encoding of negated channels. So
instead use a single bit to indicate a negation rather than 2s
complement (with sign extension into neighbouring channels, oops). The
disadvantage is that expressing the negated channel is a little more
ugly.
2010-03-04 00:04:30 +00:00
Chris Wilson
5b973c6708 drm/i915: Fix crash with linear-step-function
Avoid the potential divide by zero by falling back to pixman rendered
gradient textures for such troublesome input.
2010-03-04 00:04:30 +00:00
Chris Wilson
404ead7eeb drm/i915: Ensure simple alpha is written to green on alpha-only surfaces.
The intricacies of h/w make convoluted s/w.
2010-03-04 00:04:30 +00:00
Chris Wilson
1f2daf6524 drm/i915: Avoid double multiplication of linear alpha. 2010-03-04 00:04:21 +00:00
Chris Wilson
cdaef58c19 drm/i915: Acquire device before shader commit. 2010-03-03 23:57:36 +00:00
Chris Wilson
dd6f96dd4a drm/i965: Ignore flushing on device finish. 2010-03-03 23:57:36 +00:00
Chris Wilson
3692597567 drm/i965: Merge the constants into the surface stream.
As we can use an offset from the surface base for the constant buffers,
we need to fold the constants into the surface stream.
2010-03-03 23:57:35 +00:00
Chris Wilson
cc58594757 drm/intel: Set the 1D gradient texture to be untiled. 2010-03-03 23:57:35 +00:00
Chris Wilson
543cf07364 drm/intel: Set default extend mode for rendering gradient subsets. 2010-03-03 23:57:35 +00:00