[mutter] cogl: Remove unused CoglTextureVable::get_type



commit 862e56f01ded76f05b76b77dbb1e1354dfe5e12e
Author: Adam Jackson <ajax redhat com>
Date:   Fri Mar 8 14:48:08 2019 -0500

    cogl: Remove unused CoglTextureVable::get_type
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/546

 cogl/cogl/cogl-atlas-texture.c             |  7 -------
 cogl/cogl/cogl-sub-texture.c               |  9 ---------
 cogl/cogl/cogl-texture-2d-sliced.c         |  7 -------
 cogl/cogl/cogl-texture-2d.c                |  7 -------
 cogl/cogl/cogl-texture-private.h           | 14 --------------
 cogl/cogl/cogl-texture.c                   |  6 ------
 cogl/cogl/winsys/cogl-texture-pixmap-x11.c | 13 -------------
 7 files changed, 63 deletions(-)
---
diff --git a/cogl/cogl/cogl-atlas-texture.c b/cogl/cogl/cogl-atlas-texture.c
index fce936a4d..ea7b5f13d 100644
--- a/cogl/cogl/cogl-atlas-texture.c
+++ b/cogl/cogl/cogl-atlas-texture.c
@@ -1013,12 +1013,6 @@ _cogl_atlas_texture_remove_reorganize_callback (CoglContext *ctx,
     g_hook_destroy_link (&ctx->atlas_reorganize_callbacks, hook);
 }
 
-static CoglTextureType
-_cogl_atlas_texture_get_type (CoglTexture *tex)
-{
-  return COGL_TEXTURE_TYPE_2D;
-}
-
 static const CoglTextureVtable
 cogl_atlas_texture_vtable =
   {
@@ -1040,7 +1034,6 @@ cogl_atlas_texture_vtable =
     _cogl_atlas_texture_gl_flush_legacy_texobj_wrap_modes,
     _cogl_atlas_texture_get_format,
     _cogl_atlas_texture_get_gl_format,
-    _cogl_atlas_texture_get_type,
     NULL, /* is_foreign */
     NULL /* set_auto_mipmap */
   };
diff --git a/cogl/cogl/cogl-sub-texture.c b/cogl/cogl/cogl-sub-texture.c
index 1ab2dc90f..dc5cf2a2d 100644
--- a/cogl/cogl/cogl-sub-texture.c
+++ b/cogl/cogl/cogl-sub-texture.c
@@ -415,14 +415,6 @@ _cogl_sub_texture_get_gl_format (CoglTexture *tex)
   return _cogl_texture_gl_get_format (sub_tex->full_texture);
 }
 
-static CoglTextureType
-_cogl_sub_texture_get_type (CoglTexture *tex)
-{
-  CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex);
-
-  return _cogl_texture_get_type (sub_tex->full_texture);
-}
-
 static const CoglTextureVtable
 cogl_sub_texture_vtable =
   {
@@ -444,7 +436,6 @@ cogl_sub_texture_vtable =
     _cogl_sub_texture_gl_flush_legacy_texobj_wrap_modes,
     _cogl_sub_texture_get_format,
     _cogl_sub_texture_get_gl_format,
-    _cogl_sub_texture_get_type,
     NULL, /* is_foreign */
     NULL /* set_auto_mipmap */
   };
diff --git a/cogl/cogl/cogl-texture-2d-sliced.c b/cogl/cogl/cogl-texture-2d-sliced.c
index b5628acbf..1a3af6c61 100644
--- a/cogl/cogl/cogl-texture-2d-sliced.c
+++ b/cogl/cogl/cogl-texture-2d-sliced.c
@@ -1442,12 +1442,6 @@ _cogl_texture_2d_sliced_get_gl_format (CoglTexture *tex)
   return _cogl_texture_gl_get_format (COGL_TEXTURE (slice_tex));
 }
 
-static CoglTextureType
-_cogl_texture_2d_sliced_get_type (CoglTexture *tex)
-{
-  return COGL_TEXTURE_TYPE_2D;
-}
-
 static const CoglTextureVtable
 cogl_texture_2d_sliced_vtable =
   {
@@ -1469,7 +1463,6 @@ cogl_texture_2d_sliced_vtable =
     _cogl_texture_2d_sliced_gl_flush_legacy_texobj_wrap_modes,
     _cogl_texture_2d_sliced_get_format,
     _cogl_texture_2d_sliced_get_gl_format,
-    _cogl_texture_2d_sliced_get_type,
     _cogl_texture_2d_sliced_is_foreign,
     NULL /* set_auto_mipmap */
   };
diff --git a/cogl/cogl/cogl-texture-2d.c b/cogl/cogl/cogl-texture-2d.c
index a768d36fa..24fc426a7 100644
--- a/cogl/cogl/cogl-texture-2d.c
+++ b/cogl/cogl/cogl-texture-2d.c
@@ -667,12 +667,6 @@ _cogl_texture_2d_is_foreign (CoglTexture *tex)
   return COGL_TEXTURE_2D (tex)->is_foreign;
 }
 
-static CoglTextureType
-_cogl_texture_2d_get_type (CoglTexture *tex)
-{
-  return COGL_TEXTURE_TYPE_2D;
-}
-
 static const CoglTextureVtable
 cogl_texture_2d_vtable =
   {
@@ -694,7 +688,6 @@ cogl_texture_2d_vtable =
     _cogl_texture_2d_gl_flush_legacy_texobj_wrap_modes,
     _cogl_texture_2d_get_format,
     _cogl_texture_2d_get_gl_format,
-    _cogl_texture_2d_get_type,
     _cogl_texture_2d_is_foreign,
     _cogl_texture_2d_set_auto_mipmap
   };
diff --git a/cogl/cogl/cogl-texture-private.h b/cogl/cogl/cogl-texture-private.h
index 05a0045f8..f3b4ce3d0 100644
--- a/cogl/cogl/cogl-texture-private.h
+++ b/cogl/cogl/cogl-texture-private.h
@@ -146,8 +146,6 @@ struct _CoglTextureVtable
   CoglPixelFormat (* get_format) (CoglTexture *tex);
   GLenum (* get_gl_format) (CoglTexture *tex);
 
-  CoglTextureType (* get_type) (CoglTexture *tex);
-
   gboolean (* is_foreign) (CoglTexture *tex);
 
   /* Only needs to be implemented if is_primitive == TRUE */
@@ -354,18 +352,6 @@ _cogl_texture_spans_foreach_in_region (CoglSpan *x_spans,
                                        CoglMetaTextureCallback callback,
                                        void *user_data);
 
-/*
- * _cogl_texture_get_type:
- * @texture: a #CoglTexture pointer
- *
- * Retrieves the texture type of the underlying hardware texture that
- * this #CoglTexture will use.
- *
- * Return value: The type of the hardware texture.
- */
-CoglTextureType
-_cogl_texture_get_type (CoglTexture *texture);
-
 gboolean
 _cogl_texture_set_region (CoglTexture *texture,
                           int width,
diff --git a/cogl/cogl/cogl-texture.c b/cogl/cogl/cogl-texture.c
index bdbeb0d89..a07baf259 100644
--- a/cogl/cogl/cogl-texture.c
+++ b/cogl/cogl/cogl-texture.c
@@ -327,12 +327,6 @@ cogl_texture_get_gl_texture (CoglTexture *texture,
                                           out_gl_handle, out_gl_target);
 }
 
-CoglTextureType
-_cogl_texture_get_type (CoglTexture *texture)
-{
-  return texture->vtable->get_type (texture);
-}
-
 void
 _cogl_texture_pre_paint (CoglTexture *texture, CoglTexturePrePaintFlags flags)
 {
diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
index 881a4ff8e..d15a69ad9 100644
--- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -1032,18 +1032,6 @@ _cogl_texture_pixmap_x11_get_gl_format (CoglTexture *tex)
   return _cogl_texture_gl_get_format (child_tex);
 }
 
-static CoglTextureType
-_cogl_texture_pixmap_x11_get_type (CoglTexture *tex)
-{
-  CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex);
-  CoglTexture *child_tex;
-
-  child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap);
-
-  /* Forward on to the child texture */
-  return _cogl_texture_get_type (child_tex);
-}
-
 static void
 _cogl_texture_pixmap_x11_free (CoglTexturePixmapX11 *tex_pixmap)
 {
@@ -1110,7 +1098,6 @@ cogl_texture_pixmap_x11_vtable =
     _cogl_texture_pixmap_x11_gl_flush_legacy_texobj_wrap_modes,
     _cogl_texture_pixmap_x11_get_format,
     _cogl_texture_pixmap_x11_get_gl_format,
-    _cogl_texture_pixmap_x11_get_type,
     NULL, /* is_foreign */
     NULL /* set_auto_mipmap */
   };


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