Chris Wilson
e540d040bd
xcb: trivial memfault fixes.
...
The first fixes required to kick-start memfault testing of the xcb
backend.
2010-05-10 13:36:53 +01:00
Chris Wilson
8b486db9a9
region: _cairo_region_create_in_error()
...
Avoid leaks when reporting memfault associated with constructing
regions.
2010-05-10 12:45:31 +01:00
Chris Wilson
9d863cd394
xcb: Find the correct xcb_screen_t for faking Screen
...
When choosing the xcb_screen_t to use for the xlib-xcb backing surface,
it helps if it matches the screen used to generate similar surfaces and
snapshots - otherwise we end up pulling the image back from the XServer
every time we want to use the Picture.
2010-05-08 18:24:48 +01:00
Chris Wilson
448d357108
xcb: Upload images in place.
...
A common operation is to store an image in a similar surface, so
construct a fast path to avoid the allocation and double-blit through a
temporary pixmap.
2010-05-08 18:24:48 +01:00
Chris Wilson
e48cbd3b47
xcb: Reset picture after failed snapshot.
...
Clear the local picture variable if we cannot use the snapshot so that
we are forced to create a new and valid picture.
2010-05-08 18:24:48 +01:00
Chris Wilson
4e3c19833e
test: Force cairo-test-suite to return SUCCESS
...
Set the CAIRO_TEST_FORCE_PASS environment variable to run through the
test suite and ignore errors. Useful for forcing distcheck to continue
past a broken test suite.
2010-05-08 18:24:48 +01:00
Chris Wilson
ad8abc0110
subsurface: Don't double apply device offset for deep subsurfaces.
...
If we have a subsurface of a subsurface then the device offset has
already been applied to the extents that we use to offset the new
subsurface.
2010-05-08 18:24:48 +01:00
Benjamin Otte
d2a250ad33
gl: Make the shader implementation per-context, not global
2010-05-08 18:08:18 +02:00
Benjamin Otte
4571055c46
gl: Print GL errors when releasing the device
...
Don't scatter calls to error printing around everywhere, instead do it
in the one place where it matters.
Also, convert the functions to macros, so we can use __FILE__ and
__LINE__ when printing a warning
2010-05-08 18:03:05 +02:00
Benjamin Otte
59b31aeed9
gl: Make check_span_renderer() call not require a device lock
...
Note that we didn't lock the device previously, so the function was
broken.
2010-05-08 15:09:39 +02:00
Chris Wilson
81f4dd65a3
cairo: Special case cairo_t with NULL_POINTER
...
Avoid allocation for the potential user error of attempting to use
cairo_create(NULL).
2010-05-07 22:35:18 +01:00
Chris Wilson
a61570a55e
test/copy-path: memfault status checks.
2010-05-07 22:35:14 +01:00
Chris Wilson
e6180d1d5e
surface-fallback: Only destroy the clip after it has been initialized.
...
More memfault detected error path errors.
2010-05-07 22:19:43 +01:00
timeless
01a208f7e3
Remove useless null checks of a and b in _cairo_path_fixed_equal
...
'a' and 'b' are dereferenced before being checked for null.
From https://bugzilla.mozilla.org/show_bug.cgi?id=555706
2010-05-07 10:24:49 -04:00
Jonathan Kew
0068d9b5cd
quartz: Work around bad glyph extents returned by CoreGraphics for empty glyphs in Al Bayan font
...
This resolves the problem by checking for the crazy glyph bbox result from
CoreGraphics, and replacing it with an empty rect.
From https://bugzilla.mozilla.org/show_bug.cgi?id=534260
2010-05-07 10:16:32 -04:00
Chris Wilson
c5d9643417
doc: regen
2010-05-07 11:25:03 +01:00
Chris Wilson
b9e9ff5934
subsurface: Include device offset in extents
...
Adjust the subsurface extents so that the user specifies the extents in
world space rather than device space.
2010-05-07 11:25:03 +01:00
Jeff Muizelaar
5e3b28ffea
Remove comma from the end of the CAIRO_PATTERN_ACQUIRE enum
2010-05-06 22:27:09 -04:00
Chris Wilson
cc8442514a
gl: Enable fixed-function without glsl.
...
Through a very simple mistake we were triggering fallbacks after
detecting we were not able to perform the composite using GLSL -- we
were just returning the UNSUPPORTED status instead of enabling the
fixed-function path.
2010-05-06 21:55:44 +01:00
Metal Sonic
30d358e098
Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation"
...
From https://bugzilla.mozilla.org/show_bug.cgi?id=507387
2010-05-06 16:07:43 -04:00
Chris Wilson
506636e19e
cairo: stash a number of contexts for use with NO_MUTEX
...
The implementation is the same as the atomic one (bar the use of atomic
primitives to manipulate the occupancy!).
Patch based on the original by Jeff Muizelaar.
2010-05-06 17:21:59 +01:00
Chris Wilson
91dfee420c
device: Reorder finalization so that user data is destroyed last.
...
As the user is likely to attach the underlying resources to the device
for automatic collection upon finalization, it is important that the
user data is then destroy last (so that those resources are still
available in the surface and device cleanup routines).
2010-05-06 17:07:02 +01:00
Chris Wilson
2658d7ef5f
test/gl-surface-source: Attach GLXContext to device user data.
...
As we actually use the GLXContext to create the device, we only want to
free those resources upon the final unreference of the device (and not
the initial surface).
2010-05-06 17:07:02 +01:00
Jeff Muizelaar
f5167dc2e1
Add an implementation of ffs() for MSVC
2010-05-06 11:43:52 -04:00
Chris Wilson
a2a2bd62ff
surface-fallback: Handle memfaults during clipping.
...
Don't be lazy, propagate the error rather than asserting.
2010-05-06 14:40:19 +01:00
Chris Wilson
2e3acee410
test: Add gl-surface-source
...
Exercise using GL sources.
2010-05-06 14:38:55 +01:00
Chris Wilson
75d8550891
test/clip-contexts: Free secondary context
2010-05-06 13:50:27 +01:00
Chris Wilson
bf83bf00a7
test: Add subsurface-image-repeat
...
Test handling of source clipping with an image - principally to check
handling of mime types and zero-copy image snapshotting in the vector
surfaces and ensure that they work with subsurface patterns as well.
2010-05-06 10:53:48 +01:00
Chris Wilson
88986fdbef
xlib: Remove reference counting for cairo_xlib_screen_t
...
The screen is owned by the cairo_xlib_display_t device, so we can
simplify and close the refleak by removing the surplus reference
counting.
2010-05-06 10:46:49 +01:00
Chris Wilson
632fabc77d
xlib: Convert visual array to a cairo_list_t
...
It's simpler and more memory efficient.
2010-05-06 10:10:38 +01:00
Chris Wilson
20d75bdadc
xlib: Remove screen->has_render
...
Use the info from the display instead.
2010-05-06 10:03:36 +01:00
Chris Wilson
9e0b716ecf
xlib: Remove obsolete comment, there is no race anymore
...
The display lock is now held for the duration of the screen creation, so
there is no race. Remove the false comment.
2010-05-06 09:58:46 +01:00
Chris Wilson
62346c500a
xlib: Ensure the global display mutex is initialized before use.
2010-05-06 09:37:02 +01:00
Chris Wilson
fb6caf08ae
image: Propagate error instead of asserting.
...
Apparently we can get to this point without evaluating the clip surface,
so return the error status rather than assert.
2010-05-06 09:30:41 +01:00
Chris Wilson
5e95c62bbb
clip: Propagate failure from retrieving the previous clip surface.
2010-05-06 09:10:55 +01:00
Chris Wilson
a6ee7aea8a
test: Add xlib-expose-event.image16.ref.png
2010-05-05 19:04:13 +01:00
Chris Wilson
ded2dc8faa
scaled-font: Pluck last glyph from the most recent page.
...
In converting to cairo_list_t, it helps to preserve the semantics of
appending the page to the end of the list where it is expected to be
plucked in the event of an allocation failure.
2010-05-05 18:07:29 +01:00
Adrian Johnson
fa937913e0
PS: Add missing 'q' when resetting clip path
2010-05-05 21:44:33 +09:30
Benjamin Otte
9c594d8b40
gl: Get rid of ctx variable
...
The code used renderer->ctx and ctx interchangably, that was confusing.
2010-05-05 12:30:01 +02:00
Benjamin Otte
a354f1f92a
gl: Another case of proper device acquiring
...
This patch isn't strictly necessary, but it cleans up the code.
2010-05-05 12:30:01 +02:00
Benjamin Otte
36210ee514
gl: Get rid of another cast to cairo_gl_context_t
2010-05-05 12:30:01 +02:00
Benjamin Otte
58b03691d3
gl: Introduce _cairo_gl_device_has_glsl() function
...
The function takes a cairo_device_t argument as it can be called on an
unacquired device.
This is the first patch in a process to try to rid cairo-gl-surface.c of
casts from cairo_device_t to cairo_gl_context_t. As its members should
usually only be accessed when the device is locked, the only way the
cairo_gl_context_t should be acquired is using
_cairo_gl_context_acquire().
2010-05-05 12:30:01 +02:00
Benjamin Otte
5223b65423
gl: Get rid of cairo_gl_surface_glfinish() from public API
...
This is now done explicitly in the boilerplate code. It was not a useful
public API to begin with.
2010-05-05 12:30:01 +02:00
Benjamin Otte
e071fa2c4f
gl: Remove unused member variable
2010-05-05 12:30:01 +02:00
Benjamin Otte
90c64f60d8
gl: Move device-specific code into cairo-gl-device.c
2010-05-05 12:30:01 +02:00
Benjamin Otte
0ff5a18fd5
gl: Make _gl_set_destination() take the context as an argument
...
Keeping with the API introduced for Xlib, functions that require an
acquired context take this context as the first argument.
2010-05-05 12:30:01 +02:00
Benjamin Otte
e8c5b6b1c2
Fix typo in docs
2010-05-05 12:30:01 +02:00
Benjamin Otte
53508e6e30
gl: Acquire the context before destroying it.
2010-05-05 12:30:01 +02:00
Benjamin Otte
c46aec4897
gl: acquire/release context during surface_finish()
2010-05-05 12:30:01 +02:00
Benjamin Otte
88801aabb3
gl: Acquire context when initing/destroying gl operands
2010-05-05 12:30:00 +02:00