Commit graph

28 commits

Author SHA1 Message Date
Chris Wilson
3d499ea901 xlib: Replace obsolete disable-xrender with shiny new device debug interface
As prototyped with xcb.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:41:37 +00:00
Chris Wilson
63bdae27a8 xlib,xcb: Force strict adherence to the Render specification when testing
Introduce cairo_xlib_device_debug_set_precision() to override the
automatic selection of rendering precision and force the Xorg/DDX to
strictly adhere to the precise rendering mode of the Render
specification. This allows us to test drivers without worrying, too
much, about minor discrepancies in antialiasing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-01 16:50:25 +01: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
Behdad Esfahbod
233b387c29 Use #include "cairo-*." instead of #include <cairo-*.h>
The rule is simple: <x.h> for system / other project includes,
"x.h" for local includes.
2008-06-23 00:30:04 -04:00
Robert O'Callahan
ddead8e061 Surface size getters for xlib
When accessing the underlying drawable etc of an xlib surface, it is
also helpful to be able to get the width and height without a server
round trip. This patch provides those functions.
2006-06-25 11:23:43 +02:00
Carl Worth
ef10a0403a Remove initial, final, and duplicate blank lines.
This patch was produced by running git-stripspace on all *.[ch] files
within cairo. Note that this script would have also created all the changes
from the previous commits to remove trailing whitespace.
2006-06-06 15:50:33 -07:00
Carl Worth
1431a9d4d3 Clean up error management of xlib surface getter functions. 2006-05-04 04:03:19 -07:00
Robert O'Callahan
4a4603d551 Add Xlib surface getter functions.
Add the following five functions:

cairo_public Display *
cairo_xlib_surface_get_display (cairo_surface_t *surface);

cairo_public Drawable
cairo_xlib_surface_get_drawable (cairo_surface_t *surface);

cairo_public Screen *
cairo_xlib_surface_get_screen (cairo_surface_t *surface);

cairo_public Visual *
cairo_xlib_surface_get_visual (cairo_surface_t *surface);

cairo_public int
cairo_xlib_surface_get_depth (cairo_surface_t *surface);
2006-05-04 04:03:19 -07:00
Carl Worth
63c208d83d Give cairo_public an empty definition by default.
Add new cairo_public macro before every public function call prototype.
2005-09-07 16:31:22 +00:00
Keith Packard
b3dfbe94c3 Add cairo_xlib_surface_set_drawable which changes the target drawable for an xlib cairo_t to another which shares the same format, screen and display.
reviewed by: otaylor, cworth
2005-07-21 08:45:57 +00:00
Keith Packard
88cf98fe33 Add Screen* arguments to:
cairo_xlib_surface_create_with_xrender_format cairo_xlib_surface_create_for_bitmap
Required to correctly identify when two Xlib surfaces are compatible with Core and Render rendering requests.
cairo_xlib_surface_create can determine the screen given the required Visual *
reviewed by: otaylor
2005-07-20 18:52:31 +00:00
Carl Worth
0c05b23b31 Rework of cairo_xlib_surface create functions by Keith Packard:
Add cairo_xlib_surface_create_with_render_format.
Reduce Xlib constructors down to two simple forms. Add width, height to constructors and eliminate any synchronous size queries from the implementation.
Update to match new cairo_xlib_surface_t create functions.
2005-05-17 06:05:13 +00:00
Carl Worth
95859dc2c6 Add an #error if cairo-foo.h is included when cairo was compiled without support for the foo backend. 2005-05-14 10:03:56 +00:00
Owen Taylor
bef4b13716 src/cairo-xlib-surface.c src/cairo-xlib.h doc/public/cairo-sections.txt: Drop the _for_pixmap() and _for_window() out of the create functions and use some lazy cleverness to sniff the information out as needed.
src/cairo-xlib-surface.c src/cairo-xlib-test.h Makefile.am: add cairo_test_xlib_disable_render() to turn off RENDER for tests.
Test various different types of Xlib surface creation.
Remove left-over include of Xrender.h.
2005-05-13 17:54:43 +00:00
Owen Taylor
59c2730b1d src/cairo-xlib-surface.c src/cairo-xlib.h: Remove leftover cairo_xlib_surface_create(). 2005-05-10 21:06:01 +00:00
Carl Worth
10c88d4244 Change definitions of everything in cairo-features.h to prefer #if over #ifdef.
Track #ifdef -> #if changes.
Add support to automatically change all #ifdef CAIRO_HAS to #if CAIRO_HAS.
2005-05-06 21:33:22 +00:00
Carl Worth
d6fc5ee5e9 Remove cairo_set_target_surface and all other backend-specific cairo_set_target functions. Require a cairo_surface_t* to call cairo_create.
Port to use new cairo_create interface.
Rewrite all tests that were using cairo_set_target_surface to instead create a temporary cairo_t, (eventually to be replaced with cairo_begin_group).
2005-05-06 13:23:41 +00:00
Tor Lillqvist
a7a4aa34f8 src/cairo-xlib.h: include Xlib.h to fix solaris build bustage. 2005-03-29 11:54:01 +00:00
Owen Taylor
e66e4c7b8c src/cairo.h src/cairo_surface.c src/cairo-xlib.h src/cairo_xlib_surface.c: Move cairo_xlib_surface_set_device_offset() to a generic cairo_surface_set_device_offset().
Take the surface's device offset into account.
Update.
2005-03-17 12:57:42 +00:00
Owen Taylor
5fecf69e2c src/cairo-xlib.h src/cairo_xlib_surface.c: Rework set of contructors for XLib surfaces. Add cairo_xlib_surface_set_size().
src/cairo-xlib.h src/cairo_xlib_surface.c: Add cairo_xlib_surface_set_device_offset().
Rewrite for clarity and efficiency.
Use a temporary pixmap to avoid possible BadMatch when fetch from windows.
src/cairo.[ch] src/cairo-xlib.h: Fix some parameter names for the docs.
Update
2005-03-15 16:25:30 +00:00
Carl Worth
dcfb0d8a2b Switch from broken cworth@isi.edu address to canonical cworth@cworth.org address. 2005-02-22 11:35:03 +00:00
Owen Taylor
97424a3c2a Change cairo_font_t to refer to a font scaled to a particular output device resolution.
src/cairoint.h src/cairo_font.c src/cairo_ft_font.c src/cairo_xlib_surface.c src/cairo_pdf_surface.c src/cairo_gstate.c src/cairo.c: Switch many internal methods from handling cairo_unscaled_font_t and cairo_font_scale_t pairs to handling cairo_font_t.
src/cairo-ft-private.h src/cairo_ft_fontc: Add some internal interfaces for use by the FreeType backend.
Clear the gstate's current font when the transform or target surface changes.
src/cairo.h src/cairo_ft_font.c: Rename cairo_ft_font_pattern to cairo_ft_font_get_pattern().
src/cairo.h src/cairo_ft_font.c: Make cairo_ft_font_create() and cairo_ft_font_create_for_ft_face() take a font scale; make the latter take load_flags for FT_Load_Glyph() as well. Change cairo_ft_font_face() to Xft-style cairo_ft_font_lock_face, cairo_ft_font_unlock_face.
Remove the name/slant/weight=>unscaled font cache, it didn't work with the new cairo_font_t setup. If it turns out to be needed, it can be added back in some other form.
src/cairoint.h src/cairo_font.c: Add a 'flags' field to cairo_glyph_cache_key_t, we use it for load flags with freetype backend.
Switch the caching to be from resolved fontconfig pattern => file; keep only a fixed number of FT_Face objects open at once, similar to FreeType.
src/cairo_gstate.c src/cairoint.h: Add public cairo_font_glyph_extents, use it to implement _cairo_gstate_glyph_extents().
Add refcounting for glyph cache elements; there was an bug where elements got ejected from the cache and freed before they could be used.
src/cairoint.h src/cairo_cache.c (_cairo_cache_random_entry()) New function to return a random entry in the cache matching a predicate; reuse the internals for the previous _random_live_entry().
src/cairoint.h src/cairo_cache.c (_cairo_cache_lookup()): Add an optional created_entry return value.
src/cairo_ft_font.c src/cairo_xlib_surface.c: Adapt to _cairo_cache_lookup() change.
Support max_memory == 0 to indicate an unbounded cache.
src/cairoint.h src/cairo_cache.c (_cairo_cache_remove()): Add a function to manually remove entries from the cache.
Update for changes, document cairo_matrix_t, cairo_glyph_t, etc.
src/cairo.h src/cairo-atsui.h src/cairo-ft.h src/cairo-glitz.h src/cairo-pdf.h src/cairo-png.h src/cairo-ps.h src/cairo-quartz.h src/cairo-xcb.h src/cairo-xlib.h: Add CAIRO_BEGIN/END_DECLS for extern "C", use it on all public headers. Move header guards outermost.
Fix encoding.
2005-01-21 14:33:47 +00:00
Carl Worth
b646ecfe08 Track various renamings.
Insert new includes for backend-specific header files.
Remove redundant include of cairo-features.h.
Rename header-exclusion macro from _CAIRO_H_ to CAIRO_H. Remove platform-specific grubbing for cairo-features.h and pixman.h in odd places.
Remove all backend-specific prototypes, (as they are now in their own header files).
Remove deprecated
Remove printf.
Convert to utf-8. Use the proper name for multiple-header exclusion (CAIRO_FEATURES_H). Track rename of FREETYPE_FONT_FEATURE to FT_FONT_FEATURE.
Split cairo.h up into cairo.h, cairo-ft.h, cairo-glitz.h, cairo-pdf.h, cairo-png.h, cairo-ps.h, cairo-xcb.h, cairo-xlib.h. Update for rename of cairo_wideint.h to cairo-wideint.h.
Rename CAIRO_HAS_FREETYPE_FONT to CAIRO_HAS_FT_FONT, (to match cairo_ft_font functions and cairo-ft.h).
Update for public header files now in /cairo.
2005-01-20 08:28:54 +00:00
Carl Worth
aae17d3b6b Bumped version to 0.1.14 to indicate dropped cairo-xlib.h and new cairo-config.h.
New support for "./configure --without-x" to compile without the xlib backend. Many thanks to Sasha V. <sasha@aftercode.net>.
We do three things here: Make the pkg-config check for xrender conditional, set XLIB_BACKEND_DEFINE to either CAIRO_HAS_XLIB_BACKEND or CAIRO_HAS_NO_XLIB_BACKEND to be substituted into cairo-config.h, and set an AM_CONDITIONAL for HAVE_XLIB_BACKEND to enable conditional compilation of cairo_xlib_surface.c. Perhaps that could be simplified a tad, but it's what we have working now. Also split up various PKG_CHECK_MODULES into separate checks.
Remove errant reference to cairo_gstate_set_drawable.
Move xlib-specific calls in from old cairo-xlib.h, now guarded in #ifdef CAIRO_HAS_XLIB_BACKEND.
Make compilation of cairo_xlib_surface.c conditional. (INCLUDES, libcairo_la_LIBADD): Add the new variables from splitting up the PKG_CHECK_MODULES calls.
2003-12-03 12:27:44 +00:00
Carl Worth
32df4d217d Moved all libic-related drawing into cairo_image_surface.c 2003-10-31 10:41:37 +00:00
Carl Worth
2c9d1913cc Fixed copyright attribution to refer to "University of Southern California 2003-10-23 07:47:29 +00:00
Carl Worth
5f48214ad2 Add extern "C" stuff to cairo-xlib.h 2003-10-11 13:49:13 +00:00
Jamey Sharp
973ee89983 Virtualized the font and surface backend implementations. 2003-09-30 18:56:22 +00:00