[cairo-commit] gtkcairo/gtkcairo gdkcairo.c, 1.1, 1.2 gdkcairo.h, 1.1, 1.2 gtkcairo.c, 1.13, 1.14

OEyvind Kolaas commit at pdx.freedesktop.org
Sun May 23 15:30:24 PDT 2004


Committed by: pippin

Update of /cvs/cairo/gtkcairo/gtkcairo
In directory pdx:/tmp/cvs-serv17086/gtkcairo

Modified Files:
	gdkcairo.c gdkcairo.h gtkcairo.c 
Log Message:
make gtkcairo compile without glitz installed


Index: gdkcairo.c
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gdkcairo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/gdkcairo.c	20 May 2004 18:41:16 -0000	1.1
--- b/gdkcairo.c	23 May 2004 22:30:21 -0000	1.2
***************
*** 26,36 ****
  
  #include <gdk/gdkx.h>
- #include <cairo.h>
  #include "gdkcairo.h"
- #include "gtkcairo.h"
- 
- #ifdef CAIRO_HAS_GL_SURFACE
- #include <glitz-glx.h>
- #endif
  
  static void
--- 26,30 ----
***************
*** 45,49 ****
      self->backend = GDKCAIRO_BACKEND_XLIB;
      #endif
!     #ifdef CAIRO_HAS_GL_SURFACE
      {
          char *GTKCAIRO_GL=getenv ("GTKCAIRO_GL");
--- 39,43 ----
      self->backend = GDKCAIRO_BACKEND_XLIB;
      #endif
!     #ifdef USE_GL
      {
          char *GTKCAIRO_GL=getenv ("GTKCAIRO_GL");
***************
*** 63,67 ****
              }
              #endif
!             #ifdef CAIRO_HAS_GL_SURFACE
              else if (!strcmp (GDKCAIRO_BACKEND, "gl")) {
                  self->backend = GDKCAIRO_BACKEND_GL;
--- 57,61 ----
              }
              #endif
!             #ifdef USE_GL
              else if (!strcmp (GDKCAIRO_BACKEND, "gl")) {
                  self->backend = GDKCAIRO_BACKEND_GL;
***************
*** 69,74 ****
              #endif
              else {
-                 fprintf (stderr, "unknown GDKCAIRO_BACKEND '%s' assuming image\n", GDKCAIRO_BACKEND);
                  self->backend = GDKCAIRO_BACKEND_IMAGE;
              }
          }
--- 63,71 ----
              #endif
              else {
                  self->backend = GDKCAIRO_BACKEND_IMAGE;
+                 #ifdef CAIRO_HAS_XLIB_SURFACE
+                 self->backend = GDKCAIRO_BACKEND_XLIB;
+                 #endif
+                 fprintf (stderr, "unknown GTKCAIRO_BACKEND '%s' falling back\n", GDKCAIRO_BACKEND);
              }
          }
***************
*** 82,86 ****
              break;
          #endif
!         #ifdef CAIRO_HAS_GL_SURFACE
          case GDKCAIRO_BACKEND_GL:
              self->glitz_surface = NULL;
--- 79,83 ----
              break;
          #endif
!         #ifdef USE_GL
          case GDKCAIRO_BACKEND_GL:
              self->glitz_surface = NULL;
***************
*** 88,91 ****
--- 85,89 ----
          #endif
          default:
+             g_assert (0);
              break;
      }
***************
*** 143,147 ****
              break;
          #endif
!         #ifdef CAIRO_HAS_GL_SURFACE
          case GDKCAIRO_BACKEND_GL: {
  	        Display *dpy = gdk_x11_get_default_xdisplay ();
--- 141,145 ----
              break;
          #endif
!         #ifdef USE_GL
          case GDKCAIRO_BACKEND_GL: {
  	        Display *dpy = gdk_x11_get_default_xdisplay ();
***************
*** 207,211 ****
                 break;
           #endif
!          #ifdef CAIRO_HAS_GL_SURFACE
             case GDKCAIRO_BACKEND_GL:
              if (self->glitz_surface) {
--- 205,209 ----
                 break;
           #endif
!          #ifdef USE_GL
             case GDKCAIRO_BACKEND_GL:
              if (self->glitz_surface) {
***************
*** 231,235 ****
  
      switch (self->backend) {
!         #ifdef CAIRO_HAS_GL_SURFACE
          case GDKCAIRO_BACKEND_GL:{
  
--- 229,233 ----
  
      switch (self->backend) {
!         #ifdef USE_GL
          case GDKCAIRO_BACKEND_GL:{
  

Index: gdkcairo.h
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gdkcairo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/gdkcairo.h	20 May 2004 18:41:16 -0000	1.1
--- b/gdkcairo.h	23 May 2004 22:30:21 -0000	1.2
***************
*** 31,43 ****
  #include <cairo.h>
  
  
  typedef enum {
      GDKCAIRO_BACKEND_IMAGE,
!     #ifdef CAIRO_HAS_XLIB_SURFACE
      GDKCAIRO_BACKEND_XLIB,
!     #endif
!     #ifdef CAIRO_HAS_GL_SURFACE
      GDKCAIRO_BACKEND_GL,
!     #endif
      GDKCAIRO_BACKEND_NONE
  } gdkcairo_backend;
--- 31,49 ----
  #include <cairo.h>
  
+ #ifdef USE_GL
+     #ifndef CAIRO_HAS_GL_SURFACE
+         #undef #USE_GL
+     #endif
+ #endif
+ 
  
  typedef enum {
      GDKCAIRO_BACKEND_IMAGE,
! //    #ifdef CAIRO_HAS_XLIB_SURFACE
      GDKCAIRO_BACKEND_XLIB,
! //    #endif
! //    #ifdef USE_GLITZ
      GDKCAIRO_BACKEND_GL,
! //    #endif
      GDKCAIRO_BACKEND_NONE
  } gdkcairo_backend;
***************
*** 49,53 ****
      gdkcairo_backend backend;
  
!     #ifdef CAIRO_HAS_GL_SURFACE
  	glitz_surface_t *glitz_surface;
      #endif
--- 55,59 ----
      gdkcairo_backend backend;
  
!     #ifdef USE_GL
  	glitz_surface_t *glitz_surface;
      #endif

Index: gtkcairo.c
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gtkcairo.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** a/gtkcairo.c	23 May 2004 21:00:15 -0000	1.13
--- b/gtkcairo.c	23 May 2004 22:30:21 -0000	1.14
***************
*** 29,36 ****
  #include <gdk/gdkx.h>
  
- #include <cairo.h>
- 
- #include "gtkcairo.h"
  #include "gdkcairo.h"
  
  enum {
--- 29,34 ----
  #include <gdk/gdkx.h>
  
  #include "gdkcairo.h"
+ #include "gtkcairo.h"
  
  enum {





More information about the cairo-commit mailing list