[cogl] remove unused _cogl_texture_2d_sliced_new_from_foreign



commit 6b4562e4e73d8925b0eb5ff7663ec822834760e4
Author: Robert Bragg <robert linux intel com>
Date:   Sun Jun 23 19:30:27 2013 +0100

    remove unused _cogl_texture_2d_sliced_new_from_foreign
    
    We don't see any pressing need to be able to create sliced textures from
    foreign gl textures, and removing the api will make further re-working
    of the texture backends a bit easier.
    
    Reviewed-by: Neil Roberts <neil linux intel com>

 cogl/cogl-texture-2d-sliced-private.h |   11 ----
 cogl/cogl-texture-2d-sliced.c         |   92 ---------------------------------
 2 files changed, 0 insertions(+), 103 deletions(-)
---
diff --git a/cogl/cogl-texture-2d-sliced-private.h b/cogl/cogl-texture-2d-sliced-private.h
index 4ba30c5..3ceedcb 100644
--- a/cogl/cogl-texture-2d-sliced-private.h
+++ b/cogl/cogl-texture-2d-sliced-private.h
@@ -42,17 +42,6 @@ struct _CoglTexture2DSliced
 };
 
 CoglTexture2DSliced *
-_cogl_texture_2d_sliced_new_from_foreign (CoglContext *context,
-                                          unsigned int gl_handle,
-                                          unsigned int gl_target,
-                                          int width,
-                                          int height,
-                                          int x_pot_waste,
-                                          int y_pot_waste,
-                                          CoglPixelFormat  format,
-                                          CoglError **error);
-
-CoglTexture2DSliced *
 _cogl_texture_2d_sliced_new_from_bitmap (CoglBitmap *bmp,
                                          int max_waste,
                                          CoglPixelFormat internal_format,
diff --git a/cogl/cogl-texture-2d-sliced.c b/cogl/cogl-texture-2d-sliced.c
index c2fdc85..d92cd2c 100644
--- a/cogl/cogl-texture-2d-sliced.c
+++ b/cogl/cogl-texture-2d-sliced.c
@@ -1032,98 +1032,6 @@ cogl_texture_2d_sliced_new_from_bitmap (CoglBitmap *bmp,
 }
 
 CoglTexture2DSliced *
-_cogl_texture_2d_sliced_new_from_foreign (CoglContext *ctx,
-                                          unsigned int gl_handle,
-                                          unsigned int gl_target,
-                                          int width,
-                                          int height,
-                                          int x_pot_waste,
-                                          int y_pot_waste,
-                                          CoglPixelFormat format,
-                                          CoglError **error)
-{
-  /* NOTE: width, height and internal format are not queriable
-   * in GLES, hence such a function prototype.
-   */
-
-  int gl_width = 0;
-  int gl_height = 0;
-  CoglTexture2DSliced *tex_2ds;
-  CoglTexture *tex;
-  CoglSpan x_span;
-  CoglSpan y_span;
-  CoglTexture2D *tex_2d;
-
-  /* This should only be called when the texture target is 2D. If a
-     rectangle texture is used then _cogl_texture_new_from_foreign
-     will create a cogl_texture_rectangle instead */
-  _COGL_RETURN_VAL_IF_FAIL (gl_target == GL_TEXTURE_2D, NULL);
-
-  gl_width = width + x_pot_waste;
-  gl_height = height + y_pot_waste;
-
-  /* Validate pot waste */
-  if (x_pot_waste < 0 || x_pot_waste >= width ||
-      y_pot_waste < 0 || y_pot_waste >= height)
-    return NULL;
-
-  tex_2d = cogl_texture_2d_gl_new_from_foreign (ctx,
-                                                gl_target,
-                                                gl_width,
-                                                gl_height,
-                                                format,
-                                                error);
-
-  if (!tex_2d)
-    return NULL;
-
-  /* The texture 2d backend may use a different pixel format if it
-     queries the actual texture so we'll refetch the format it
-     actually used */
-  format = cogl_texture_get_format (COGL_TEXTURE (tex_2d));
-
-  /* Create new texture */
-  tex_2ds = g_new0 (CoglTexture2DSliced, 1);
-
-  tex = COGL_TEXTURE (tex_2ds);
-  _cogl_texture_init (tex, ctx, gl_width, gl_height,
-                      &cogl_texture_2d_sliced_vtable);
-
-  tex_2ds->max_waste = 0;
-  tex_2ds->internal_format = format;
-
-  /* Create slice arrays */
-  tex_2ds->slice_x_spans =
-    g_array_sized_new (FALSE, FALSE,
-                       sizeof (CoglSpan), 1);
-
-  tex_2ds->slice_y_spans =
-    g_array_sized_new (FALSE, FALSE,
-                       sizeof (CoglSpan), 1);
-
-  tex_2ds->slice_textures =
-    g_array_sized_new (FALSE, FALSE,
-                       sizeof (CoglTexture2D *), 1);
-
-  /* Store info for a single slice */
-  x_span.start = 0;
-  x_span.size = gl_width;
-  x_span.waste = x_pot_waste;
-  g_array_append_val (tex_2ds->slice_x_spans, x_span);
-
-  y_span.start = 0;
-  y_span.size = gl_height;
-  y_span.waste = y_pot_waste;
-  g_array_append_val (tex_2ds->slice_y_spans, y_span);
-
-  g_array_append_val (tex_2ds->slice_textures, tex_2d);
-
-  _cogl_texture_set_allocated (COGL_TEXTURE (tex_2ds), TRUE);
-
-  return _cogl_texture_2d_sliced_object_new (tex_2ds);
-}
-
-CoglTexture2DSliced *
 cogl_texture_2d_sliced_new_from_data (CoglContext *ctx,
                                       int width,
                                       int height,


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