summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-09-26 17:05:01 +0100
committerNeil Roberts <neil@linux.intel.com>2012-09-27 12:05:32 +0100
commit003f080531d5368835081568779b031ef4f09a77 (patch)
tree481a437791fb5ec53a6cddb4c6cc178da2d9a7b7
parentb53e3c3c00e5bd19c70a80beb22b401fec826b9e (diff)
downloadcogl-003f080531d5368835081568779b031ef4f09a77.tar.gz
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>
-rw-r--r--cogl/cogl-driver.h2
-rw-r--r--cogl/cogl-texture-2d.c2
-rw-r--r--cogl/cogl-texture-3d.c2
-rw-r--r--cogl/cogl-texture-private.h2
-rw-r--r--cogl/cogl-texture-rectangle.c2
-rw-r--r--cogl/driver/gl/cogl-texture-2d-gl-private.h2
-rw-r--r--cogl/driver/gl/cogl-texture-2d-gl.c2
-rw-r--r--cogl/winsys/cogl-texture-pixmap-x11.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/cogl/cogl-driver.h b/cogl/cogl-driver.h
index 7560ba08..f9221110 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 6b902fb1..950cccef 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 dee45429..6000b370 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 42de6791..f4b3b401 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 2d985bb7..3dca1ed4 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 492c3147..52378ffa 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 653405c5..52169ec5 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 b800f8eb..397cda35 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);