[cairo-commit] glitz/src glitz-agl.h, 1.4, 1.5 glitz-glx.h, 1.4, 1.5 glitz.h, 1.19, 1.20 glitz_agl_surface.c, 1.17, 1.18 glitz_glx_surface.c, 1.19, 1.20

David Reveman commit at pdx.freedesktop.org
Mon Sep 6 15:52:05 PDT 2004


Committed by: davidr

Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv10842/src

Modified Files:
	glitz-agl.h glitz-glx.h glitz.h glitz_agl_surface.c 
	glitz_glx_surface.c 
Log Message:
Added width and height parameters to surface_create_for_window functions

Index: glitz-agl.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz-agl.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** glitz-agl.h	9 Aug 2004 22:57:35 -0000	1.4
--- glitz-agl.h	6 Sep 2004 22:52:03 -0000	1.5
***************
*** 66,70 ****
  glitz_surface_t *
  glitz_agl_surface_create_for_window (glitz_format_t *format,
!                                      WindowRef window);
  
  #if defined(__cplusplus) || defined(c_plusplus)
--- 66,72 ----
  glitz_surface_t *
  glitz_agl_surface_create_for_window (glitz_format_t *format,
!                                      WindowRef window,
!                                      int width,
!                                      int height);
  
  #if defined(__cplusplus) || defined(c_plusplus)

Index: glitz-glx.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz-glx.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** glitz-glx.h	9 Aug 2004 22:57:35 -0000	1.4
--- glitz-glx.h	6 Sep 2004 22:52:03 -0000	1.5
***************
*** 80,84 ****
                                       int screen,
                                       glitz_format_t *format,
!                                      Window window);
  
  #if defined(__cplusplus) || defined(c_plusplus)
--- 80,86 ----
                                       int screen,
                                       glitz_format_t *format,
!                                      Window window,
!                                      int width,
!                                      int height);
  
  #if defined(__cplusplus) || defined(c_plusplus)

Index: glitz.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** glitz.h	3 Sep 2004 14:27:58 -0000	1.19
--- glitz.h	6 Sep 2004 22:52:03 -0000	1.20
***************
*** 40,44 ****
  #define GLITZ_MAJOR 0
  #define GLITZ_MINOR 2
! #define GLITZ_REVISION 0
  
  #if defined(__cplusplus) || defined(c_plusplus)
--- 40,44 ----
  #define GLITZ_MAJOR 0
  #define GLITZ_MINOR 2
! #define GLITZ_REVISION 1
  
  #if defined(__cplusplus) || defined(c_plusplus)

Index: glitz_agl_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_agl_surface.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** glitz_agl_surface.c	6 Sep 2004 22:23:29 -0000	1.17
--- glitz_agl_surface.c	6 Sep 2004 22:52:03 -0000	1.18
***************
*** 117,133 ****
  }
  
- static void
- _glitz_agl_surface_get_window_size (WindowRef window,
-                                     int *width,
-                                     int *height)
- {
-   Rect window_bounds;
- 
-   GetWindowPortBounds (window, &window_bounds);
-   
-   *width = window_bounds.right - window_bounds.left;
-   *height = window_bounds.bottom - window_bounds.top;
- }
- 
  static glitz_surface_t *
  _glitz_agl_surface_create (glitz_agl_thread_info_t *thread_info,
--- 117,120 ----
***************
*** 176,184 ****
  glitz_surface_t *
  glitz_agl_surface_create_for_window (glitz_format_t *format,
!                                      WindowRef window)
  {
    glitz_agl_surface_t *surface;
    glitz_agl_context_t *context;
-   int width, height;
    glitz_agl_thread_info_t *thread_info = glitz_agl_thread_info_get ();
  
--- 163,172 ----
  glitz_surface_t *
  glitz_agl_surface_create_for_window (glitz_format_t *format,
!                                      WindowRef window,
!                                      int width,
!                                      int height)
  {
    glitz_agl_surface_t *surface;
    glitz_agl_context_t *context;
    glitz_agl_thread_info_t *thread_info = glitz_agl_thread_info_get ();
  
***************
*** 187,192 ****
      return NULL;
  
-   _glitz_agl_surface_get_window_size (window, &width, &height);
- 
    surface = (glitz_agl_surface_t *) calloc (1, sizeof (glitz_agl_surface_t));
    if (surface == NULL)
--- 175,178 ----

Index: glitz_glx_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glx_surface.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** glitz_glx_surface.c	6 Sep 2004 22:23:29 -0000	1.19
--- glitz_glx_surface.c	6 Sep 2004 22:52:03 -0000	1.20
***************
*** 96,119 ****
  }
  
- static glitz_bool_t
- _glitz_glx_surface_get_window_size (Display *display,
-                                     Window drawable,
-                                     int *width,
-                                     int *height)
- {
-   unsigned int uwidth, uheight, bwidth_ignore, depth_ignore;
-   Window root_ignore;
-   int x_ignore, y_ignore;
-   
-   if (!XGetGeometry (display, drawable, &root_ignore, &x_ignore, &y_ignore,
-                      &uwidth, &uheight, &bwidth_ignore, &depth_ignore))
-     return 0;
-   
-   *width = (int) uwidth;
-   *height = (int) uheight;
-   
-   return 1;
- }
- 
  static glitz_texture_t *
  _glitz_glx_surface_get_texture (void *abstract_surface,
--- 96,99 ----
***************
*** 215,223 ****
                                       int screen,
                                       glitz_format_t *format,
!                                      Window window)
  {
    glitz_glx_surface_t *surface;
    glitz_glx_context_t *context;
-   int width, height;
    glitz_glx_screen_info_t *screen_info =
      glitz_glx_screen_info_get (display, screen);
--- 195,204 ----
                                       int screen,
                                       glitz_format_t *format,
!                                      Window window,
!                                      int width,
!                                      int height)
  {
    glitz_glx_surface_t *surface;
    glitz_glx_context_t *context;
    glitz_glx_screen_info_t *screen_info =
      glitz_glx_screen_info_get (display, screen);
***************
*** 227,233 ****
      return NULL;
  
-   if (!_glitz_glx_surface_get_window_size (display, window, &width, &height))
-     return NULL;
- 
    surface = (glitz_glx_surface_t *) calloc (1, sizeof (glitz_glx_surface_t));
    if (surface == NULL)
--- 208,211 ----




More information about the cairo-commit mailing list