b=428563, Upgrade Cairo to 1.6.2; r=me,a=beltzer

This commit is contained in:
vladimir@pobox.com 2008-04-11 12:38:41 -07:00
Родитель 7a69c56e59
Коммит 03f577cacc
8 изменённых файлов: 1241 добавлений и 82 удалений

Просмотреть файл

@ -22,13 +22,16 @@ anywhere it is mentioned in these instructions.
More detailed build instructions
--------------------------------
1) Configure the package
The first step in building cairo is to configure the package by
running the configure script. The configure script attempts to
automatically detect as much as possible about your system. So,
you should primarily just accept its defaults by running:
running the configure script. [Note: if you don't have a configure
script, skip down below to the Extremely detailed build
instructions.]
The configure script attempts to automatically detect as much as
possible about your system. So, you should primarily just accept
its defaults by running:
./configure
@ -60,7 +63,7 @@ More detailed build instructions
LD_LIBRARY_PATH=/opt/cairo/lib
export PKG_CONFIG_PATH LD_LIBRARY_PATH
(NOTE: On mac OS X, at least, use DYLD_LIBRARY_PATH in place
(NOTE: On Mac OS X, at least, use DYLD_LIBRARY_PATH in place
of LD_LIBRARY_PATH above.)
--enable-quartz
@ -122,7 +125,63 @@ More detailed build instructions
make install
If you are installing to a system-wide location you may need to
temporarily acquite root access in order to perform this
temporarily acquire root access in order to perform this
operation. A good way to do this is to use the sudo program:
sudo make install
Extremely detailed build instructions
-------------------------------------
So you want to build cairo but it didn't come with a configure
script. This is probably because you have checked out the latest
in-development code via git. If you need to be on the bleeding edge,
(for example, because you're wanting to develop some aspect of cairo
itself), then you're in the right place and should read on.
However, if you don't need such a bleeding-edge version of cairo, then
you might prefer to start by building the latest stable cairo release:
http://cairographics.org/releases
or perhaps the latest (unstable) development snapshot:
http://cairographics.org/snapshots
There you'll find nicely packaged tar files that include a configure
script so you can go back the the simpler instructions above.
But you're still reading, so you're someone that loves to
learn. Excellent! We hope you'll learn enough to make some excellent
contributions to cairo. Since you're not using a packaged tar file,
you're going to need some additional tools beyond just a C compiler in
order to compile cairo. Specifically, you need the following utilities:
automake (1.8 or newer)
autoconf
libtool
Hopefully your platform of choice has packages readily available so
that you can easily install things with your system's package
management tool, (such as "apt-get install automake" on Debian or "yum
install automake" on Fedora, etc.). Note that Mac OS X ships with it's
own utility called libtool which is not what you want, (the one you do
want goes by the name of glibtool).
Once you have all of those packages installed, the next step is to run
the autogen.sh script. That can be as simple as:
./autogen.sh
Or, if you're using Mac OS X, you'll have to let it know to use
glibtool by instead doing:
LIBTOOLIZE=glibtoolize ./autogen.sh
But before you run that command, note that the autogen.sh script
accepts all the same arguments as the configure script, (and in fact,
will generate the configure script and run it with the arguments you
provide). So go back up to step (1) above and see what additional
arguments you might want to pass, (such as prefix). Then continue with
the instructions, simply using ./autogen.sh in place of ./configure.
Happy hacking!

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -37,69 +37,140 @@ The primary source of information about cairo is:
http://cairographics.org/
The latest releases of cairo can be found at:
The latest versions of cairo can always be found at:
http://cairographics.org/releases
http://cairographics.org/download
Snapshots of in-development versions of cairo:
Documentation on using cairo and frequently-asked questions:
http://cairographics.org/snapshots
The programming manual for using cairo:
http://cairographics.org/manual
http://cairographics.org/documentation
http://cairographics.org/FAQ
Mailing lists for contacting cairo users and developers:
http://cairographics.org/lists
Answers to some frequently asked questions about cairo:
Roadmap and unscheduled things to do, (please feel free to help out):
http://cairographics.org/FAQ
http://cairographics.org/roadmap
http://cairographics.org/todo
Dependencies
============
The set of libraries needed to compile cairo depends on which backends
are enabled when cairo is configured. Here are the dependencies for
each backend:
are enabled when cairo is configured. So look at the list below to
determine which dependencies are needed for the backends of interest.
Surface backends:
For the surface backends, we have both "supported" and "experimental"
backends. Further, the supported backends can be divided into the
"standard" backends which can be easily built on any platform, and the
"platform" backends which depend on some underlying platform-specific
system, (such as the X Window System or some other window system).
As an example, for a standard Linux build, (with image, png, pdf,
PostScript, svg, and xlib surface backends, and the freetype font
backend), the following sample commands will install necessary
dependencies:
Debian (and similar):
apt-get install libpng12-dev libz-dev libxrender-dev libfontconfig1-dev
Fedora (and similar):
yum install libpng-devel zlib-devel libXrender-devel fontconfig-devel
(Those commands intentionally don't install pixman from a distribution
package since if you're manually compiling cairo, then you likely want
to grab pixman from the same place at the same time and compile it as
well.)
Supported, "standard" surface backends
------------------------------------
image backend (required)
------------------------
pixman http://cairographics.org/releases
or: git://git.cairographics.org/git/pixman
pixman >= 0.10.0 http://cairographics.org/releases
glitz backend
-------------
glitz >= 0.4.4 http://freedesktop.org/Software/glitz
png support (can be left out if desired, but many
----------- applications expect it to be present)
libpng http://www.libpng.org/pub/png/libpng.html
pdf backend
-----------
freetype >= 2.1.4 http://freetype.org
zlib http://www.gzip.org/zlib
postscript backend
------------------
freetype >= 2.1.4 http://freetype.org
zlib http://www.gzip.org/zlib
svg backend
-----------
[none]
Supported, "platform" surface backends
-----------------------------------
xlib backend
------------
X11 http://freedesktop.org/Software/xlibs
xlib-xrender backend
--------------------
Xrender >= 0.6 http://freedesktop.org/Software/xlibs
quartz backend
--------------
[*]
MacOS X >= 10.4 with Xcode >= 2.4
win32 backend
-------------
[*]
Microsoft Windows 2000 or newer[*].
Font backends (required to have at least one)
---------------------------------------------
freetype font backend
---------------------
freetype >= 2.1.9 http://freetype.org
fontconfig http://fontconfig.org
quartz-font backend
-------------------
MacOS X >= 10.4 with Xcode >= 2.4
win32 font backend
------------------
Microsoft Windows 2000 or newer[*].
[*] The Win32 backend should work on Windows 2000 and newer
(excluding Windows Me.) Most testing has been done on
Windows XP. While some portions of the code have been
adapted to work on older versions of Windows, considerable
work still needs to be done to get cairo running in those
environments.
Cairo can be compiled on Windows with either the gcc
toolchain (see http://www.mingw.org) or with Microsoft
Visual C++. If the gcc toolchain is used, the standard
build instructions using configure apply, (see INSTALL).
If Visual C++ is desired, GNU make is required and
Makefile.win32 can be used via 'make -f Makefile.win32'.
The compiler, include paths, and library paths must be set
up correctly in the environment.
MSVC versions earlier than 7.1 are known to miscompile
parts of cairo and pixman, and so should be avoided. MSVC
7.1 or later, including the free Microsoft Visual Studio
Express editions, produce correct code.
Experimental surface backends
-----------------------------
glitz
-------------
glitz >= 0.4.4 http://freedesktop.org/Software/glitz
xcb backend
-----------
XCB http://xcb.freedesktop.org
xlib backend
------------
Xrender >= 0.6 http://freedesktop.org/Software/xlibs
beos backend
------------
No dependencies in itself other than an installed BeOS system, but cairo
@ -112,40 +183,6 @@ Surface backends:
packages and developer dependencies are available at Netlabs:
ftp://ftp.netlabs.org/pub/cairo
Font backends:
freetype font backend
---------------------
freetype >= 2.1.4 http://freetype.org
fontconfig http://fontconfig.org
win32 font backend
------------------
[*]
atsui font backend
------------------
[*]
[*] I don't know specifically what packages might need to be
installed on a Mac OS X system to use the Quartz and ATSUI
backends. As far as win32, the situation is rather complex:
The Win32 backend should work on Windows 2000 and newer
(excluding Windows Me.) Most testing has been done on
Windows XP. While some portions of the code have been
adapted to work on older versions of Windows, considerable
work still needs to be done to get cairo running in these
environments.
Cairo can be compiled on Windows either with the GCC
toolchain (see http://www.mingw.org) or with Microsoft
Visual C++. Makefiles or project files for compiling with
MSVC are however not provided as of this release. We have
received reports that MSVC 6.0 compiles parts of cairo
incorrectly, (leading to incorrect color). MSVC 7.0 is
known to work.
Compiling
=========
See the INSTALL document for build instructions.

Просмотреть файл

@ -183,10 +183,11 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface)
" { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse\n"
" } forall\n"
"} bind def\n"
"/Td { matrix translate cairo_font_matrix matrix concatmatrix dup\n"
" /cairo_font_matrix exch def cairo_font exch selectfont 0 0 moveto } bind def\n"
"/Tm { 6 array astore dup /cairo_font_matrix exch def\n"
" cairo_font exch selectfont 0 0 moveto } bind def\n"
"/Td { matrix translate cairo_font_matrix matrix concatmatrix aload\n"
" /cairo_font_matrix exch def 6 2 roll 0 0 6 array astore\n"
" cairo_font exch selectfont moveto } bind def\n"
"/Tm { 6 copy 6 array astore /cairo_font_matrix exch def 6 2 roll 0 0\n"
" 6 array astore cairo_font exch selectfont moveto } bind def\n"
"/g { setgray } bind def\n"
"/rg { setrgbcolor } bind def\n");

Просмотреть файл

@ -2,7 +2,6 @@
#define cairo_arc _moz_cairo_arc
#define cairo_arc_negative _moz_cairo_arc_negative
#define cairo_arc_to _moz_cairo_arc_to
#define cairo_atsui_font_face_create_for_atsu_font_id _moz_cairo_atsui_font_face_create_for_atsu_font_id
#define cairo_beos_surface_create _moz_cairo_beos_surface_create
#define cairo_beos_surface_create_for_bitmap _moz_cairo_beos_surface_create_for_bitmap
#define cairo_clip _moz_cairo_clip
@ -168,6 +167,8 @@
#define cairo_ps_surface_set_size _moz_cairo_ps_surface_set_size
#define cairo_push_group _moz_cairo_push_group
#define cairo_push_group_with_content _moz_cairo_push_group_with_content
#define cairo_quartz_font_face_create_for_atsu_font_id _moz_cairo_quartz_font_face_create_for_atsu_font_id
#define cairo_quartz_font_face_create_for_cgfont _moz_cairo_quartz_font_face_create_for_cgfont
#define cairo_quartz_image_surface_create _moz_cairo_quartz_image_surface_create
#define cairo_quartz_image_surface_get_image _moz_cairo_quartz_image_surface_get_image
#define cairo_quartz_surface_create _moz_cairo_quartz_surface_create

Просмотреть файл

@ -79,6 +79,7 @@ typedef struct _cairo_xlib_visual_info {
struct _cairo_xlib_screen_info {
cairo_xlib_screen_info_t *next;
cairo_reference_count_t ref_count;
cairo_mutex_t mutex;
cairo_xlib_display_t *display;
Screen *screen;

Просмотреть файл

@ -256,12 +256,14 @@ _cairo_xlib_screen_info_close_display (cairo_xlib_screen_info_t *info)
{
int i;
CAIRO_MUTEX_LOCK (info->mutex);
for (i = 0; i < ARRAY_LENGTH (info->gc); i++) {
if (info->gc[i] != NULL) {
XFreeGC (info->display->display, info->gc[i]);
info->gc[i] = NULL;
}
}
CAIRO_MUTEX_UNLOCK (info->mutex);
}
void
@ -295,6 +297,8 @@ _cairo_xlib_screen_info_destroy (cairo_xlib_screen_info_t *info)
_cairo_array_fini (&info->visuals);
CAIRO_MUTEX_FINI (info->mutex);
free (info);
}
@ -335,6 +339,7 @@ _cairo_xlib_screen_info_get (Display *dpy, Screen *screen)
info = malloc (sizeof (cairo_xlib_screen_info_t));
if (info != NULL) {
CAIRO_REFERENCE_COUNT_INIT (&info->ref_count, 2); /* Add one for display cache */
CAIRO_MUTEX_INIT (info->mutex);
info->display = _cairo_xlib_display_reference (display);
info->screen = screen;
info->has_render = FALSE;
@ -385,16 +390,18 @@ GC
_cairo_xlib_screen_get_gc (cairo_xlib_screen_info_t *info, int depth)
{
GC gc;
cairo_bool_t needs_reset;
depth = depth_to_index (depth);
CAIRO_MUTEX_LOCK (info->mutex);
gc = info->gc[depth];
info->gc[depth] = NULL;
needs_reset = info->gc_needs_clip_reset & (1 << depth);
CAIRO_MUTEX_UNLOCK (info->mutex);
if (info->gc_needs_clip_reset & (1 << depth)) {
if (needs_reset)
XSetClipMask(info->display->display, gc, None);
info->gc_needs_clip_reset &= ~(1 << depth);
}
return gc;
}
@ -403,21 +410,25 @@ cairo_status_t
_cairo_xlib_screen_put_gc (cairo_xlib_screen_info_t *info, int depth, GC gc, cairo_bool_t reset_clip)
{
cairo_status_t status = CAIRO_STATUS_SUCCESS;
GC oldgc;
depth = depth_to_index (depth);
if (info->gc[depth] != NULL) {
status = _cairo_xlib_display_queue_work (info->display,
(cairo_xlib_notify_func) XFreeGC,
info->gc[depth],
NULL);
}
CAIRO_MUTEX_LOCK (info->mutex);
oldgc = info->gc[depth];
info->gc[depth] = gc;
if (reset_clip)
info->gc_needs_clip_reset |= 1 << depth;
else
info->gc_needs_clip_reset &= ~(1 << depth);
CAIRO_MUTEX_UNLOCK (info->mutex);
if (oldgc != NULL) {
status = _cairo_xlib_display_queue_work (info->display,
(cairo_xlib_notify_func) XFreeGC,
oldgc,
NULL);
}
return status;
}

Просмотреть файл

@ -2,7 +2,7 @@
# Reads cairo header files on stdin, and outputs a file with defines for
# renaming all public functions to Mozilla-specific names.
# Usage:
# cat *.h | ./filterpublic.awk | sort > cairo-rename.h
# cat *.h | awk -f ./filterpublic.awk | sort > cairo-rename.h
BEGIN { state = "public"; }