Commit graph

4896 commits

Author SHA1 Message Date
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
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
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
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
b73a33b89e script: Make the test suite run again! 2010-03-21 20:40:19 +00:00
Chris Wilson
2a59f0af6a wrapper: Apply device transform inverse as appropriate.
Fixes many failures of the paginated surfaces as they replayed through
the recording surfaces.
2010-03-21 20:38:27 +00:00
Chris Wilson
5720fff827 ps: Destroy the local surface on error.
Minor leak of the intermediate surface when converting to an opaque
source following an error.
2010-03-21 20:37:38 +00:00
Chris Wilson
35f318a59c paginated: Use common is_clear.
As equivalent processing to the page_is_blank optimisation done inside
the paginated surface is applied by the gstate, remove the redundant
code.
2010-03-21 20:36:26 +00:00
Chris Wilson
b101c7dab8 gl: Add EGL interface
Enable the EGL backend for GL.
2010-03-11 01:49:18 +00:00
Chris Wilson
ca6e4e1f91 spans: Initialise rects->is_bounded for polygon compat. 2010-03-11 01:48:08 +00:00
Chris Wilson
6754f1db17 gstate: Account for undropped non-transformed glyphs.
In the simplest case of pass-through glyphs we made a mistake in
propagating the number of glyphs.

Reported-by: Christophe de Dinechin <christophe@taodyne.com>
2010-03-10 15:13:00 +00:00
Chris Wilson
5fb36fe5ab drm/i965: Acquire device around commit. 2010-03-08 15:37:17 +00:00
Chris Wilson
4083f40fbd glew: don't pull in GL/glu.h 2010-03-07 16:59:57 +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
271752b944 gl: Pad the gradient texture.
Fixes test/linear-gradient-subset
2010-03-04 08:24:08 +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