[cairo-commit] cairo/src cairo_gl_surface.c, NONE, 1.1 Makefile.am,
1.23, 1.24 cairo-features.h.in, 1.4, 1.5 cairo.h, 1.52,
1.53 cairo_pattern.c, 1.1, 1.2 cairo_surface.c, 1.25, 1.26
David Reveman
commit at pdx.freedesktop.org
Fri Apr 9 14:19:49 PDT 2004
- Previous message: [cairo-commit] cairo AUTHORS, 1.5, 1.6 ChangeLog, 1.173,
1.174 cairo.pc.in, 1.13, 1.14 configure.in, 1.48, 1.49
- Next message: [cairo-commit] cairo ChangeLog, 1.174, 1.175 NEWS, 1.6,
1.7 configure.in, 1.49, 1.50
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: davidr
Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv26456/src
Modified Files:
Makefile.am cairo-features.h.in cairo.h cairo_pattern.c
cairo_surface.c
Added Files:
cairo_gl_surface.c
Log Message:
Added OpenGL surface backend
--- NEW FILE: cairo_gl_surface.c ---
(This appears to be a binary file; contents omitted.)
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/src/Makefile.am,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** a/Makefile.am 6 Apr 2004 16:36:12 -0000 1.23
--- b/Makefile.am 9 Apr 2004 21:19:47 -0000 1.24
***************
*** 18,21 ****
--- 18,25 ----
endif
+ if CAIRO_HAS_GL_SURFACE
+ libcairo_gl_sources = cairo_gl_surface.c
+ endif
+
# These names match automake style variable definition conventions so
# without these lines, automake will complain during the handling of
***************
*** 51,59 ****
$(libcairo_xlib_sources)\
$(libcairo_xcb_sources) \
cairoint.h
libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
! INCLUDES = -I$(srcdir) $(CAIRO_CFLAGS) $(FONTCONFIG_CFLAGS) $(XRENDER_CFLAGS) $(XCB_CFLAGS) $(PNG_CFLAGS)
! libcairo_la_LIBADD = $(CAIRO_LIBS) $(FONTCONFIG_LIBS) $(XRENDER_LIBS) $(XCB_LIBS) $(PS_LIBS) $(PNG_LIBS) -lm
--- 55,64 ----
$(libcairo_xlib_sources)\
$(libcairo_xcb_sources) \
+ $(libcairo_gl_sources) \
cairoint.h
libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
! INCLUDES = -I$(srcdir) $(CAIRO_CFLAGS) $(FONTCONFIG_CFLAGS) $(XRENDER_CFLAGS) $(XCB_CFLAGS) $(PNG_CFLAGS) $(GL_CFLAGS)
! libcairo_la_LIBADD = $(CAIRO_LIBS) $(FONTCONFIG_LIBS) $(XRENDER_LIBS) $(XCB_LIBS) $(PS_LIBS) $(PNG_LIBS) $(GL_LIBS) -lm
Index: cairo-features.h.in
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-features.h.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/cairo-features.h.in 24 Feb 2004 20:28:49 -0000 1.4
--- b/cairo-features.h.in 9 Apr 2004 21:19:47 -0000 1.5
***************
*** 37,39 ****
--- 37,41 ----
#define @XCB_SURFACE_FEATURE@
+ #define @GL_SURFACE_FEATURE@
+
#endif
Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** a/cairo.h 6 Apr 2004 16:36:12 -0000 1.52
--- b/cairo.h 9 Apr 2004 21:19:47 -0000 1.53
***************
*** 142,145 ****
--- 142,154 ----
#endif /* CAIRO_HAS_XCB_SURFACE */
+ #ifdef CAIRO_HAS_GL_SURFACE
+
+ #include <glitz.h>
+
+ void
+ cairo_set_target_gl (cairo_t *cr,
+ glitz_surface_t *surface);
+ #endif /* CAIRO_HAS_GL_SURFACE */
+
typedef enum cairo_operator {
CAIRO_OPERATOR_CLEAR,
***************
*** 779,782 ****
--- 788,798 ----
#endif /* CAIRO_HAS_XLIB_SURFACE */
+ #ifdef CAIRO_HAS_GL_SURFACE
+
+ cairo_surface_t *
+ cairo_gl_surface_create (glitz_surface_t *surface);
+
+ #endif /* CAIRO_HAS_GL_SURFACE */
+
/* Matrix functions */
Index: cairo_pattern.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_pattern.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/cairo_pattern.c 6 Apr 2004 16:45:17 -0000 1.1
--- b/cairo_pattern.c 9 Apr 2004 21:19:47 -0000 1.2
***************
*** 657,665 ****
case CAIRO_PATTERN_RADIAL: {
char *data;
! int width = ceil (_cairo_fixed_to_double (box->p2.x) -
! _cairo_fixed_to_double (box->p1.x));
! int height = ceil (_cairo_fixed_to_double (box->p2.y) -
! _cairo_fixed_to_double (box->p1.y));
!
data = malloc (width * height * 4);
if (!data)
--- 657,665 ----
case CAIRO_PATTERN_RADIAL: {
char *data;
! int width = ceil (_cairo_fixed_to_double (box->p2.x)) -
! floor (_cairo_fixed_to_double (box->p1.x));
! int height = ceil (_cairo_fixed_to_double (box->p2.y)) -
! floor (_cairo_fixed_to_double (box->p1.y));
!
data = malloc (width * height * 4);
if (!data)
***************
*** 667,672 ****
_cairo_pattern_add_source_offset (pattern,
! _cairo_fixed_to_double (box->p1.x),
! _cairo_fixed_to_double (box->p1.y));
if (pattern->type == CAIRO_PATTERN_RADIAL)
--- 667,672 ----
_cairo_pattern_add_source_offset (pattern,
! floor (_cairo_fixed_to_double (box->p1.x)),
! floor (_cairo_fixed_to_double (box->p1.y)));
if (pattern->type == CAIRO_PATTERN_RADIAL)
Index: cairo_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_surface.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** a/cairo_surface.c 6 Apr 2004 16:36:12 -0000 1.25
--- b/cairo_surface.c 9 Apr 2004 21:19:47 -0000 1.26
***************
*** 425,432 ****
/* handle pattern opacity */
if (pattern->color.alpha != 1.0) {
! int width = ceil (_cairo_fixed_to_double (box->p2.x) -
! _cairo_fixed_to_double (box->p1.x));
! int height = ceil (_cairo_fixed_to_double (box->p2.y) -
! _cairo_fixed_to_double (box->p1.y));
cairo_pattern_t alpha;
--- 425,432 ----
/* handle pattern opacity */
if (pattern->color.alpha != 1.0) {
! int width = ceil (_cairo_fixed_to_double (box->p2.x)) -
! floor (_cairo_fixed_to_double (box->p1.x));
! int height = ceil (_cairo_fixed_to_double (box->p2.y)) -
! floor (_cairo_fixed_to_double (box->p1.y));
cairo_pattern_t alpha;
***************
*** 464,469 ****
if (status == CAIRO_STATUS_SUCCESS) {
_cairo_pattern_add_source_offset (pattern,
! _cairo_fixed_to_double (box->p1.x),
! _cairo_fixed_to_double (box->p1.y));
} else
cairo_surface_destroy (pattern->source);
--- 464,469 ----
if (status == CAIRO_STATUS_SUCCESS) {
_cairo_pattern_add_source_offset (pattern,
! floor (_cairo_fixed_to_double (box->p1.x)),
! floor (_cairo_fixed_to_double (box->p1.y)));
} else
cairo_surface_destroy (pattern->source);
- Previous message: [cairo-commit] cairo AUTHORS, 1.5, 1.6 ChangeLog, 1.173,
1.174 cairo.pc.in, 1.13, 1.14 configure.in, 1.48, 1.49
- Next message: [cairo-commit] cairo ChangeLog, 1.174, 1.175 NEWS, 1.6,
1.7 configure.in, 1.49, 1.50
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list