[cogl/cogl-1.14: 29/174] Fix a warning in the vtable for texture_2d_get_data



commit 2bcf38d1263cda3c2a7489c17df66c579b729ebe
Author: Neil Roberts <neil linux intel com>
Date:   Wed Sep 26 17:05:01 2012 +0100

    Fix a warning in the vtable for texture_2d_get_data
    
    The function pointer for texture_2d_get_data in the driver vtable was
    expecting an unsigned int for the rowstride but the definition in
    cogl-texture-2d-gl.c took a size_t so it was giving an annoying
    warning. This normalizes them both to just take an int. This seems to
    better match the pattern used for cogl_bitmap_new_from_data and
    cogl_texture_2d_new_from_data.
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit 003f080531d5368835081568779b031ef4f09a77)

 cogl/cogl-driver.h                          |    2 +-
 cogl/cogl-texture-2d.c                      |    2 +-
 cogl/cogl-texture-3d.c                      |    2 +-
 cogl/cogl-texture-private.h                 |    2 +-
 cogl/cogl-texture-rectangle.c               |    2 +-
 cogl/driver/gl/cogl-texture-2d-gl-private.h |    2 +-
 cogl/driver/gl/cogl-texture-2d-gl.c         |    2 +-
 cogl/winsys/cogl-texture-pixmap-x11.c       |    2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/cogl/cogl-driver.h b/cogl/cogl-driver.h
index 7560ba0..f922111 100644
--- a/cogl/cogl-driver.h
+++ b/cogl/cogl-driver.h
@@ -209,7 +209,7 @@ struct _CoglDriverVtable
   void
   (* texture_2d_get_data) (CoglTexture2D *tex_2d,
                            CoglPixelFormat format,
-                           unsigned int rowstride,
+                           int rowstride,
                            uint8_t *data);
 
   /* Prepares for drawing by flushing the journal, framebuffer state,
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index 6b902fb..950ccce 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -505,7 +505,7 @@ _cogl_texture_2d_set_region (CoglTexture    *tex,
 static CoglBool
 _cogl_texture_2d_get_data (CoglTexture *tex,
                            CoglPixelFormat format,
-                           unsigned int rowstride,
+                           int rowstride,
                            uint8_t *data)
 {
   CoglContext *ctx = tex->context;
diff --git a/cogl/cogl-texture-3d.c b/cogl/cogl-texture-3d.c
index dee4542..6000b37 100644
--- a/cogl/cogl-texture-3d.c
+++ b/cogl/cogl-texture-3d.c
@@ -572,7 +572,7 @@ _cogl_texture_3d_set_region (CoglTexture    *tex,
 static int
 _cogl_texture_3d_get_data (CoglTexture *tex,
                            CoglPixelFormat format,
-                           unsigned int rowstride,
+                           int rowstride,
                            uint8_t *data)
 {
   /* FIXME: we could probably implement this by assuming the data is
diff --git a/cogl/cogl-texture-private.h b/cogl/cogl-texture-private.h
index 618191d..a52101f 100644
--- a/cogl/cogl-texture-private.h
+++ b/cogl/cogl-texture-private.h
@@ -81,7 +81,7 @@ struct _CoglTextureVtable
      be necessary). */
   CoglBool (* get_data) (CoglTexture *tex,
                          CoglPixelFormat format,
-                         unsigned int rowstride,
+                         int rowstride,
                          uint8_t *data);
 
   void (* foreach_sub_texture_in_region) (CoglTexture *tex,
diff --git a/cogl/cogl-texture-rectangle.c b/cogl/cogl-texture-rectangle.c
index 2d985bb..3dca1ed 100644
--- a/cogl/cogl-texture-rectangle.c
+++ b/cogl/cogl-texture-rectangle.c
@@ -568,7 +568,7 @@ _cogl_texture_rectangle_set_region (CoglTexture    *tex,
 static CoglBool
 _cogl_texture_rectangle_get_data (CoglTexture *tex,
                                   CoglPixelFormat format,
-                                  unsigned int rowstride,
+                                  int rowstride,
                                   uint8_t *data)
 {
   CoglTextureRectangle *tex_rect = COGL_TEXTURE_RECTANGLE (tex);
diff --git a/cogl/driver/gl/cogl-texture-2d-gl-private.h b/cogl/driver/gl/cogl-texture-2d-gl-private.h
index 492c314..52378ff 100644
--- a/cogl/driver/gl/cogl-texture-2d-gl-private.h
+++ b/cogl/driver/gl/cogl-texture-2d-gl-private.h
@@ -106,7 +106,7 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
 void
 _cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
                               CoglPixelFormat format,
-                              size_t rowstride,
+                              int rowstride,
                               uint8_t *data);
 
 #endif /* _COGL_TEXTURE_2D_GL_PRIVATE_H_ */
diff --git a/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/driver/gl/cogl-texture-2d-gl.c
index 889ae12..5056544 100644
--- a/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -542,7 +542,7 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
 void
 _cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
                               CoglPixelFormat format,
-                              size_t rowstride,
+                              int rowstride,
                               uint8_t *data)
 {
   CoglContext *ctx = COGL_TEXTURE (tex_2d)->context;
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
index 7797105..b7889bc 100644
--- a/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -694,7 +694,7 @@ _cogl_texture_pixmap_x11_set_region (CoglTexture     *tex,
 static CoglBool
 _cogl_texture_pixmap_x11_get_data (CoglTexture *tex,
                                    CoglPixelFormat format,
-                                   unsigned int rowstride,
+                                   int rowstride,
                                    uint8_t *data)
 {
   CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]