[cairo-commit] 3 commits - boilerplate/Makefile.win32.features build/Makefile.win32.features build/Makefile.win32.features-h configure.ac src/cairo.h src/cairo-surface.c src/cairo-tee.h src/cairo-tee-surface.c src/Makefile.sources src/Makefile.win32.features test/api-special-cases.c
Benjamin Otte
company at kemper.freedesktop.org
Fri Jul 30 13:31:22 PDT 2010
boilerplate/Makefile.win32.features | 6 ++-
build/Makefile.win32.features | 3 +
build/Makefile.win32.features-h | 2 +
configure.ac | 4 +-
src/Makefile.sources | 6 ++-
src/Makefile.win32.features | 10 ++++-
src/cairo-surface.c | 4 ++
src/cairo-tee-surface.c | 2 +
src/cairo-tee.h | 66 ++++++++++++++++++++++++++++++++++++
src/cairo.h | 17 ---------
test/api-special-cases.c | 9 ++++
11 files changed, 103 insertions(+), 26 deletions(-)
New commits:
commit 142df6f9638e10d0712e092d902f7670965a88f9
Author: Benjamin Otte <otte at redhat.com>
Date: Fri Jul 30 22:04:44 2010 +0200
configure: Disable xml backend by default
We don't want to enable it by default when nobody uses it.
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index 136afd3..ee59071 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -432,7 +432,7 @@ enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_tee_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_tee_sources)
endif
-supported_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
+unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xml_private)
all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xml_cxx_sources)
diff --git a/build/Makefile.win32.features b/build/Makefile.win32.features
index c2708d2..7e60617 100644
--- a/build/Makefile.win32.features
+++ b/build/Makefile.win32.features
@@ -33,7 +33,7 @@ CAIRO_HAS_PDF_SURFACE=1
CAIRO_HAS_SVG_SURFACE=1
CAIRO_HAS_TEST_SURFACES=0
CAIRO_HAS_TEE_SURFACE=0
-CAIRO_HAS_XML_SURFACE=1
+CAIRO_HAS_XML_SURFACE=0
CAIRO_HAS_PTHREAD=0
CAIRO_HAS_TRACE=0
CAIRO_HAS_INTERPRETER=1
diff --git a/configure.ac b/configure.ac
index a2c2d9b..e75f0db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -626,7 +626,7 @@ dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(recording, recording, always)
CAIRO_ENABLE_SURFACE_BACKEND(tee, tee, no)
-CAIRO_ENABLE_SURFACE_BACKEND(xml, xml, yes, [
+CAIRO_ENABLE_SURFACE_BACKEND(xml, xml, no, [
use_xml=$have_libz
xml_NONPKGCONFIG_LIBS=-lz
])
diff --git a/src/Makefile.win32.features b/src/Makefile.win32.features
index 6e1fa8c..4e3b74a 100644
--- a/src/Makefile.win32.features
+++ b/src/Makefile.win32.features
@@ -562,7 +562,7 @@ ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
enabled_cairo_pkgconf += cairo-tee.pc
endif
-supported_cairo_headers += $(cairo_xml_headers)
+unsupported_cairo_headers += $(cairo_xml_headers)
all_cairo_headers += $(cairo_xml_headers)
all_cairo_private += $(cairo_xml_private)
all_cairo_cxx_sources += $(cairo_xml_cxx_sources)
commit 9f33f8453b4949cfdc63169d3acd7238f89379c2
Author: Benjamin Otte <otte at redhat.com>
Date: Fri Jul 30 21:48:14 2010 +0200
configure: Disable tee backend by default
We don't want to enable it by default when nobody uses it.
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index c2177da..136afd3 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -420,15 +420,17 @@ enabled_cairo_boilerplate_private += $(cairo_boilerplate_recording_private)
enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_recording_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_recording_sources)
-supported_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
+unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_tee_private)
all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_tee_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_tee_sources)
+ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_tee_private)
enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_tee_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_tee_sources)
+endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
diff --git a/build/Makefile.win32.features b/build/Makefile.win32.features
index e80153f..c2708d2 100644
--- a/build/Makefile.win32.features
+++ b/build/Makefile.win32.features
@@ -32,6 +32,7 @@ CAIRO_HAS_PS_SURFACE=1
CAIRO_HAS_PDF_SURFACE=1
CAIRO_HAS_SVG_SURFACE=1
CAIRO_HAS_TEST_SURFACES=0
+CAIRO_HAS_TEE_SURFACE=0
CAIRO_HAS_XML_SURFACE=1
CAIRO_HAS_PTHREAD=0
CAIRO_HAS_TRACE=0
diff --git a/build/Makefile.win32.features-h b/build/Makefile.win32.features-h
index 16cca7f..2106f02 100644
--- a/build/Makefile.win32.features-h
+++ b/build/Makefile.win32.features-h
@@ -103,7 +103,9 @@ ifeq ($(CAIRO_HAS_TEST_SURFACES),1)
endif
@echo "#define CAIRO_HAS_IMAGE_SURFACE 1" >> src/cairo-features.h
@echo "#define CAIRO_HAS_RECORDING_SURFACE 1" >> src/cairo-features.h
+ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
@echo "#define CAIRO_HAS_TEE_SURFACE 1" >> src/cairo-features.h
+endif
ifeq ($(CAIRO_HAS_XML_SURFACE),1)
@echo "#define CAIRO_HAS_XML_SURFACE 1" >> src/cairo-features.h
endif
diff --git a/configure.ac b/configure.ac
index cb66294..a2c2d9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -625,7 +625,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(recording, recording, always)
-CAIRO_ENABLE_SURFACE_BACKEND(tee, tee, always)
+CAIRO_ENABLE_SURFACE_BACKEND(tee, tee, no)
CAIRO_ENABLE_SURFACE_BACKEND(xml, xml, yes, [
use_xml=$have_libz
xml_NONPKGCONFIG_LIBS=-lz
diff --git a/src/Makefile.win32.features b/src/Makefile.win32.features
index 8fe6af7..6e1fa8c 100644
--- a/src/Makefile.win32.features
+++ b/src/Makefile.win32.features
@@ -546,15 +546,21 @@ enabled_cairo_private += $(cairo_recording_private)
enabled_cairo_cxx_sources += $(cairo_recording_cxx_sources)
enabled_cairo_sources += $(cairo_recording_sources)
-supported_cairo_headers += $(cairo_tee_headers)
+unsupported_cairo_headers += $(cairo_tee_headers)
all_cairo_headers += $(cairo_tee_headers)
all_cairo_private += $(cairo_tee_private)
all_cairo_cxx_sources += $(cairo_tee_cxx_sources)
all_cairo_sources += $(cairo_tee_sources)
+ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
enabled_cairo_headers += $(cairo_tee_headers)
enabled_cairo_private += $(cairo_tee_private)
enabled_cairo_cxx_sources += $(cairo_tee_cxx_sources)
enabled_cairo_sources += $(cairo_tee_sources)
+endif
+all_cairo_pkgconf += cairo-tee.pc
+ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
+enabled_cairo_pkgconf += cairo-tee.pc
+endif
supported_cairo_headers += $(cairo_xml_headers)
all_cairo_headers += $(cairo_xml_headers)
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index f4ada74..ba70a2e 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1666,6 +1666,8 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
if (unlikely (surface->finished))
return _cairo_error (CAIRO_STATUS_SURFACE_FINISHED);
+#if CAIRO_HAS_TEE_SURFACE
+
if (src->type == CAIRO_SURFACE_TYPE_TEE) {
cairo_surface_t *match;
@@ -1676,6 +1678,8 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
src = match;
}
+#endif
+
if (surface->backend->clone_similar != NULL) {
status = surface->backend->clone_similar (surface, src,
src_x, src_y,
diff --git a/test/api-special-cases.c b/test/api-special-cases.c
index b251976..95a0a7c 100644
--- a/test/api-special-cases.c
+++ b/test/api-special-cases.c
@@ -390,6 +390,8 @@ test_cairo_recording_surface_ink_extents (cairo_surface_t *surface)
return x == 0 && y == 0 && w == 0 && h == 0 ? CAIRO_TEST_SUCCESS : CAIRO_TEST_ERROR;
}
+#if CAIRO_HAS_TEE_SURFACE
+
static cairo_test_status_t
test_cairo_tee_surface_add (cairo_surface_t *surface)
{
@@ -422,6 +424,8 @@ test_cairo_tee_surface_index (cairo_surface_t *surface)
return status ? CAIRO_TEST_SUCCESS : CAIRO_TEST_ERROR;
}
+#endif /* CAIRO_HAS_TEE_SURFACE */
+
#if CAIRO_HAS_GL_SURFACE
static cairo_test_status_t
@@ -667,9 +671,11 @@ struct {
TEST (cairo_surface_write_to_png_stream, -1, FALSE),
#endif
TEST (cairo_recording_surface_ink_extents, CAIRO_SURFACE_TYPE_RECORDING, FALSE),
+#if CAIRO_HAS_TEE_SURFACE
TEST (cairo_tee_surface_add, CAIRO_SURFACE_TYPE_TEE, TRUE),
TEST (cairo_tee_surface_remove, CAIRO_SURFACE_TYPE_TEE, TRUE),
TEST (cairo_tee_surface_index, CAIRO_SURFACE_TYPE_TEE, FALSE),
+#endif
#if CAIRO_HAS_GL_SURFACE
TEST (cairo_gl_surface_set_size, CAIRO_SURFACE_TYPE_GL, TRUE),
TEST (cairo_gl_surface_get_width, CAIRO_SURFACE_TYPE_GL, FALSE),
commit 9f4d677e2a6dd0bfbbbe20de39f92177bfdfc0e8
Author: Benjamin Otte <otte at redhat.com>
Date: Fri Jul 30 22:15:55 2010 +0200
tee: Move definitions into separate header
diff --git a/src/Makefile.sources b/src/Makefile.sources
index e0153cd..e2759cc 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -97,7 +97,6 @@ cairo_private = \
cairo-surface-subsurface-private.h \
cairo-surface-snapshot-private.h \
cairo-surface-wrapper-private.h \
- cairo-tee-surface-private.h \
cairo-types-private.h \
cairo-user-font-private.h \
cairo-wideint-private.h \
@@ -168,7 +167,6 @@ cairo_sources = \
cairo-surface-subsurface.c \
cairo-surface-wrapper.c \
cairo-system.c \
- cairo-tee-surface.c \
cairo-tor-scan-converter.c \
cairo-toy-font-face.c \
cairo-traps.c \
@@ -377,6 +375,10 @@ if CAIRO_HAS_SCRIPT_SURFACE
req_cairo_deflate_stream_sources = $(cairo_deflate_stream_sources)
endif
+cairo_tee_headers = cairo-tee.h
+cairo_tee_private = cairo-tee-surface-private.h \
+cairo_tee_sources = cairo-tee-surface.c
+
cairo_xml_headers = cairo-xml.h
cairo_xml_sources = cairo-xml-surface.c
if CAIRO_HAS_XML_SURFACE
diff --git a/src/cairo-tee-surface.c b/src/cairo-tee-surface.c
index f17c37c..e37cef8 100644
--- a/src/cairo-tee-surface.c
+++ b/src/cairo-tee-surface.c
@@ -40,6 +40,8 @@
#include "cairoint.h"
+#include "cairo-tee.h"
+
#include "cairo-error-private.h"
#include "cairo-tee-surface-private.h"
#include "cairo-surface-wrapper-private.h"
diff --git a/src/cairo-tee.h b/src/cairo-tee.h
new file mode 100644
index 0000000..9c048c6
--- /dev/null
+++ b/src/cairo-tee.h
@@ -0,0 +1,66 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2009 Chris Wilson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is Chris Wilson
+ *
+ * Contributor(s):
+ * Chris Wilson <chris at chris-wilson.co.uk>
+ */
+
+#ifndef CAIRO_TEE_H
+#define CAIRO_TEE_H
+
+#include "cairo.h"
+
+#if CAIRO_HAS_TEE_SURFACE
+
+CAIRO_BEGIN_DECLS
+
+cairo_public cairo_surface_t *
+cairo_tee_surface_create (cairo_surface_t *master);
+
+cairo_public void
+cairo_tee_surface_add (cairo_surface_t *surface,
+ cairo_surface_t *target);
+
+cairo_public void
+cairo_tee_surface_remove (cairo_surface_t *surface,
+ cairo_surface_t *target);
+
+cairo_public cairo_surface_t *
+cairo_tee_surface_index (cairo_surface_t *surface,
+ int index);
+
+CAIRO_END_DECLS
+
+#else /*CAIRO_HAS_TEE_SURFACE*/
+# error Cairo was not compiled with support for the TEE backend
+#endif /*CAIRO_HAS_TEE_SURFACE*/
+
+#endif /*CAIRO_TEE_H*/
diff --git a/src/cairo.h b/src/cairo.h
index 9251bf6..8e7594c 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -2338,23 +2338,6 @@ cairo_recording_surface_ink_extents (cairo_surface_t *surface,
double *width,
double *height);
-/* Tee-surface functions */
-
-cairo_public cairo_surface_t *
-cairo_tee_surface_create (cairo_surface_t *master);
-
-cairo_public void
-cairo_tee_surface_add (cairo_surface_t *surface,
- cairo_surface_t *target);
-
-cairo_public void
-cairo_tee_surface_remove (cairo_surface_t *surface,
- cairo_surface_t *target);
-
-cairo_public cairo_surface_t *
-cairo_tee_surface_index (cairo_surface_t *surface,
- int index);
-
/* Pattern creation functions */
cairo_public cairo_pattern_t *
diff --git a/test/api-special-cases.c b/test/api-special-cases.c
index 63eb5d0..b251976 100644
--- a/test/api-special-cases.c
+++ b/test/api-special-cases.c
@@ -84,6 +84,9 @@
#if CAIRO_HAS_SVG_SURFACE
#include <cairo-svg.h>
#endif
+#if CAIRO_HAS_TEE_SURFACE
+#include <cairo-tee.h>
+#endif
#if CAIRO_HAS_XCB_SURFACE
#include <cairo-xcb.h>
#endif
More information about the cairo-commit
mailing list