[cogl/wip/drm-driver: 7/9] texture: remove unused cogl_texture_get_max_waste



commit bfa0120f24a9ea0782e7a21cd7ce9f6fd0d113a2
Author: Robert Bragg <robert linux intel com>
Date:   Mon Nov 26 11:52:55 2012 +0000

    texture: remove unused cogl_texture_get_max_waste
    
    This removes cogl_texture_get_max_waste which wasn't used internally
    anywhere and it doesn't really seem like a meaningful thing for
    applications to query.

 cogl/cogl-atlas-texture.c             |   10 ----------
 cogl/cogl-sub-texture.c               |    9 ---------
 cogl/cogl-texture-2d-sliced.c         |    9 ---------
 cogl/cogl-texture-2d.c                |    7 -------
 cogl/cogl-texture-3d.c                |    7 -------
 cogl/cogl-texture-private.h           |    2 --
 cogl/cogl-texture-rectangle.c         |    7 -------
 cogl/cogl-texture.c                   |    6 ------
 cogl/cogl-texture.h                   |   12 ------------
 cogl/cogl.symbols                     |    1 -
 cogl/winsys/cogl-texture-pixmap-x11.c |   10 ----------
 11 files changed, 0 insertions(+), 80 deletions(-)
---
diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c
index f37a7cc..bbf08e6 100644
--- a/cogl/cogl-atlas-texture.c
+++ b/cogl/cogl-atlas-texture.c
@@ -284,15 +284,6 @@ _cogl_atlas_texture_free (CoglAtlasTexture *atlas_tex)
   _cogl_texture_free (COGL_TEXTURE (atlas_tex));
 }
 
-static int
-_cogl_atlas_texture_get_max_waste (CoglTexture *tex)
-{
-  CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
-
-  /* Forward on to the sub texture */
-  return cogl_texture_get_max_waste (atlas_tex->sub_texture);
-}
-
 static CoglBool
 _cogl_atlas_texture_is_sliced (CoglTexture *tex)
 {
@@ -897,7 +888,6 @@ cogl_atlas_texture_vtable =
     _cogl_atlas_texture_set_region,
     NULL, /* get_data */
     _cogl_atlas_texture_foreach_sub_texture_in_region,
-    _cogl_atlas_texture_get_max_waste,
     _cogl_atlas_texture_is_sliced,
     _cogl_atlas_texture_can_hardware_repeat,
     _cogl_atlas_texture_transform_coords_to_gl,
diff --git a/cogl/cogl-sub-texture.c b/cogl/cogl-sub-texture.c
index cb9da39..4c3e376 100644
--- a/cogl/cogl-sub-texture.c
+++ b/cogl/cogl-sub-texture.c
@@ -274,14 +274,6 @@ cogl_sub_texture_get_parent (CoglSubTexture *sub_texture)
   return sub_texture->next_texture;
 }
 
-static int
-_cogl_sub_texture_get_max_waste (CoglTexture *tex)
-{
-  CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex);
-
-  return cogl_texture_get_max_waste (sub_tex->full_texture);
-}
-
 static CoglBool
 _cogl_sub_texture_is_sliced (CoglTexture *tex)
 {
@@ -446,7 +438,6 @@ cogl_sub_texture_vtable =
     _cogl_sub_texture_set_region,
     NULL, /* get_data */
     _cogl_sub_texture_foreach_sub_texture_in_region,
-    _cogl_sub_texture_get_max_waste,
     _cogl_sub_texture_is_sliced,
     _cogl_sub_texture_can_hardware_repeat,
     _cogl_sub_texture_transform_coords_to_gl,
diff --git a/cogl/cogl-texture-2d-sliced.c b/cogl/cogl-texture-2d-sliced.c
index 9fc6971..7d931d2 100644
--- a/cogl/cogl-texture-2d-sliced.c
+++ b/cogl/cogl-texture-2d-sliced.c
@@ -1153,14 +1153,6 @@ _cogl_texture_2d_sliced_is_foreign (CoglTexture *tex)
   return _cogl_texture_is_foreign (COGL_TEXTURE (slice_tex));
 }
 
-static int
-_cogl_texture_2d_sliced_get_max_waste (CoglTexture *tex)
-{
-  CoglTexture2DSliced *tex_2ds = COGL_TEXTURE_2D_SLICED (tex);
-
-  return tex_2ds->max_waste;
-}
-
 static CoglBool
 _cogl_texture_2d_sliced_is_sliced (CoglTexture *tex)
 {
@@ -1408,7 +1400,6 @@ cogl_texture_2d_sliced_vtable =
     _cogl_texture_2d_sliced_set_region,
     NULL, /* get_data */
     _cogl_texture_2d_sliced_foreach_sub_texture_in_region,
-    _cogl_texture_2d_sliced_get_max_waste,
     _cogl_texture_2d_sliced_is_sliced,
     _cogl_texture_2d_sliced_can_hardware_repeat,
     _cogl_texture_2d_sliced_transform_coords_to_gl,
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index e488821..d0111f3 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -375,12 +375,6 @@ _cogl_texture_2d_copy_from_framebuffer (CoglTexture2D *tex_2d,
   tex_2d->mipmaps_dirty = TRUE;
 }
 
-static int
-_cogl_texture_2d_get_max_waste (CoglTexture *tex)
-{
-  return -1;
-}
-
 static CoglBool
 _cogl_texture_2d_is_sliced (CoglTexture *tex)
 {
@@ -564,7 +558,6 @@ cogl_texture_2d_vtable =
     _cogl_texture_2d_set_region,
     _cogl_texture_2d_get_data,
     NULL, /* foreach_sub_texture_in_region */
-    _cogl_texture_2d_get_max_waste,
     _cogl_texture_2d_is_sliced,
     _cogl_texture_2d_can_hardware_repeat,
     _cogl_texture_2d_transform_coords_to_gl,
diff --git a/cogl/cogl-texture-3d.c b/cogl/cogl-texture-3d.c
index fc54579..aa9671c 100644
--- a/cogl/cogl-texture-3d.c
+++ b/cogl/cogl-texture-3d.c
@@ -457,12 +457,6 @@ cogl_texture_3d_new_from_data (CoglContext *context,
   return ret;
 }
 
-static int
-_cogl_texture_3d_get_max_waste (CoglTexture *tex)
-{
-  return -1;
-}
-
 static CoglBool
 _cogl_texture_3d_is_sliced (CoglTexture *tex)
 {
@@ -657,7 +651,6 @@ cogl_texture_3d_vtable =
     _cogl_texture_3d_set_region,
     _cogl_texture_3d_get_data,
     NULL, /* foreach_sub_texture_in_region */
-    _cogl_texture_3d_get_max_waste,
     _cogl_texture_3d_is_sliced,
     _cogl_texture_3d_can_hardware_repeat,
     _cogl_texture_3d_transform_coords_to_gl,
diff --git a/cogl/cogl-texture-private.h b/cogl/cogl-texture-private.h
index 92ddae2..2dfbf20 100644
--- a/cogl/cogl-texture-private.h
+++ b/cogl/cogl-texture-private.h
@@ -97,8 +97,6 @@ struct _CoglTextureVtable
                                           CoglMetaTextureCallback callback,
                                           void *user_data);
 
-  int (* get_max_waste) (CoglTexture *tex);
-
   CoglBool (* is_sliced) (CoglTexture *tex);
 
   CoglBool (* can_hardware_repeat) (CoglTexture *tex);
diff --git a/cogl/cogl-texture-rectangle.c b/cogl/cogl-texture-rectangle.c
index 6db60c0..adda70e 100644
--- a/cogl/cogl-texture-rectangle.c
+++ b/cogl/cogl-texture-rectangle.c
@@ -443,12 +443,6 @@ cogl_texture_rectangle_new_from_foreign (CoglContext *ctx,
   return tex_rect;
 }
 
-static int
-_cogl_texture_rectangle_get_max_waste (CoglTexture *tex)
-{
-  return -1;
-}
-
 static CoglBool
 _cogl_texture_rectangle_is_sliced (CoglTexture *tex)
 {
@@ -660,7 +654,6 @@ cogl_texture_rectangle_vtable =
     _cogl_texture_rectangle_set_region,
     _cogl_texture_rectangle_get_data,
     NULL, /* foreach_sub_texture_in_region */
-    _cogl_texture_rectangle_get_max_waste,
     _cogl_texture_rectangle_is_sliced,
     _cogl_texture_rectangle_can_hardware_repeat,
     _cogl_texture_rectangle_transform_coords_to_gl,
diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index ef795c0..5a90f29 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -272,12 +272,6 @@ cogl_texture_get_format (CoglTexture *texture)
 }
 
 int
-cogl_texture_get_max_waste (CoglTexture *texture)
-{
-  return texture->vtable->get_max_waste (texture);
-}
-
-int
 _cogl_texture_get_n_levels (CoglTexture *texture)
 {
   int width = cogl_texture_get_width (texture);
diff --git a/cogl/cogl-texture.h b/cogl/cogl-texture.h
index 8ede133..0a7783b 100644
--- a/cogl/cogl-texture.h
+++ b/cogl/cogl-texture.h
@@ -294,18 +294,6 @@ CoglPixelFormat
 cogl_texture_get_format (CoglTexture *texture);
 
 /**
- * cogl_texture_get_max_waste:
- * @texture a #CoglTexture pointer.
- *
- * Queries the maximum wasted (unused) pixels in one dimension of a GPU side
- * texture.
- *
- * Return value: the maximum waste
- */
-int
-cogl_texture_get_max_waste (CoglTexture *texture);
-
-/**
  * cogl_texture_is_sliced:
  * @texture a #CoglTexture pointer.
  *
diff --git a/cogl/cogl.symbols b/cogl/cogl.symbols
index 115f1d1..8ace28b 100644
--- a/cogl/cogl.symbols
+++ b/cogl/cogl.symbols
@@ -553,7 +553,6 @@ cogl_texture_get_data
 cogl_texture_get_format
 cogl_texture_get_gl_texture
 cogl_texture_get_height
-cogl_texture_get_max_waste
 cogl_texture_get_width
 cogl_texture_is_sliced
 cogl_texture_new_from_bitmap
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
index 8ad6f3a..36f3476 100644
--- a/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -825,15 +825,6 @@ _cogl_texture_pixmap_x11_foreach_sub_texture_in_region
                                          user_data);
 }
 
-static int
-_cogl_texture_pixmap_x11_get_max_waste (CoglTexture *tex)
-{
-  CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex);
-  CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap);
-
-  return cogl_texture_get_max_waste (child_tex);
-}
-
 static CoglBool
 _cogl_texture_pixmap_x11_is_sliced (CoglTexture *tex)
 {
@@ -1017,7 +1008,6 @@ cogl_texture_pixmap_x11_vtable =
     _cogl_texture_pixmap_x11_set_region,
     _cogl_texture_pixmap_x11_get_data,
     _cogl_texture_pixmap_x11_foreach_sub_texture_in_region,
-    _cogl_texture_pixmap_x11_get_max_waste,
     _cogl_texture_pixmap_x11_is_sliced,
     _cogl_texture_pixmap_x11_can_hardware_repeat,
     _cogl_texture_pixmap_x11_transform_coords_to_gl,



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