cogl/texture: Remove unused get_max_waste vfunc
As only 2DSliced has one, no need for abstracting things were not needed. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4200>
This commit is contained in:
parent
6d9ef4d52a
commit
f613c82ab5
@ -255,16 +255,6 @@ _cogl_atlas_texture_gl_flush_legacy_texobj_wrap_modes (CoglTexture *tex,
|
||||
wrap_mode_t);
|
||||
}
|
||||
|
||||
static int
|
||||
_cogl_atlas_texture_get_max_waste (CoglTexture *tex)
|
||||
{
|
||||
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
||||
CoglTextureClass *klass = COGL_TEXTURE_GET_CLASS (atlas_tex->sub_texture);
|
||||
|
||||
/* Forward on to the sub texture */
|
||||
return klass->get_max_waste (COGL_TEXTURE (atlas_tex->sub_texture));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cogl_atlas_texture_is_sliced (CoglTexture *tex)
|
||||
{
|
||||
@ -814,7 +804,6 @@ cogl_atlas_texture_class_init (CoglAtlasTextureClass *klass)
|
||||
texture_class->allocate = _cogl_atlas_texture_allocate;
|
||||
texture_class->set_region = _cogl_atlas_texture_set_region;
|
||||
texture_class->foreach_sub_texture_in_region = _cogl_atlas_texture_foreach_sub_texture_in_region;
|
||||
texture_class->get_max_waste = _cogl_atlas_texture_get_max_waste;
|
||||
texture_class->is_sliced = _cogl_atlas_texture_is_sliced;
|
||||
texture_class->can_hardware_repeat = _cogl_atlas_texture_can_hardware_repeat;
|
||||
|
||||
|
@ -188,15 +188,6 @@ _cogl_sub_texture_allocate (CoglTexture *tex,
|
||||
return status;
|
||||
}
|
||||
|
||||
static int
|
||||
_cogl_sub_texture_get_max_waste (CoglTexture *tex)
|
||||
{
|
||||
CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex);
|
||||
CoglTextureClass *klass = COGL_TEXTURE_GET_CLASS (sub_tex->full_texture);
|
||||
|
||||
return klass->get_max_waste (sub_tex->full_texture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cogl_sub_texture_is_sliced (CoglTexture *tex)
|
||||
{
|
||||
@ -366,7 +357,6 @@ cogl_sub_texture_class_init (CoglSubTextureClass *klass)
|
||||
texture_class->set_region = _cogl_sub_texture_set_region;
|
||||
texture_class->is_get_data_supported = _cogl_sub_texture_is_get_data_supported;
|
||||
texture_class->foreach_sub_texture_in_region = _cogl_sub_texture_foreach_sub_texture_in_region;
|
||||
texture_class->get_max_waste = _cogl_sub_texture_get_max_waste;
|
||||
texture_class->is_sliced = _cogl_sub_texture_is_sliced;
|
||||
texture_class->can_hardware_repeat = _cogl_sub_texture_can_hardware_repeat;
|
||||
texture_class->transform_coords_to_gl = _cogl_sub_texture_transform_coords_to_gl;
|
||||
|
@ -735,14 +735,6 @@ _cogl_texture_2d_sliced_allocate (CoglTexture *tex,
|
||||
g_return_val_if_reached (FALSE);
|
||||
}
|
||||
|
||||
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 gboolean
|
||||
_cogl_texture_2d_sliced_is_sliced (CoglTexture *tex)
|
||||
{
|
||||
@ -1192,7 +1184,6 @@ cogl_texture_2d_sliced_class_init (CoglTexture2DSlicedClass *klass)
|
||||
texture_class->allocate = _cogl_texture_2d_sliced_allocate;
|
||||
texture_class->set_region = _cogl_texture_2d_sliced_set_region;
|
||||
texture_class->foreach_sub_texture_in_region = _cogl_texture_2d_sliced_foreach_sub_texture_in_region;
|
||||
texture_class->get_max_waste = _cogl_texture_2d_sliced_get_max_waste;
|
||||
texture_class->is_sliced = _cogl_texture_2d_sliced_is_sliced;
|
||||
texture_class->can_hardware_repeat = _cogl_texture_2d_sliced_can_hardware_repeat;
|
||||
texture_class->transform_coords_to_gl = _cogl_texture_2d_sliced_transform_coords_to_gl;
|
||||
|
@ -147,12 +147,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 gboolean
|
||||
_cogl_texture_2d_is_sliced (CoglTexture *tex)
|
||||
{
|
||||
@ -350,7 +344,6 @@ cogl_texture_2d_class_init (CoglTexture2DClass *klass)
|
||||
texture_class->set_region = _cogl_texture_2d_set_region;
|
||||
texture_class->is_get_data_supported = _cogl_texture_2d_is_get_data_supported;
|
||||
texture_class->get_data = _cogl_texture_2d_get_data;
|
||||
texture_class->get_max_waste = _cogl_texture_2d_get_max_waste;
|
||||
texture_class->is_sliced = _cogl_texture_2d_is_sliced;
|
||||
texture_class->can_hardware_repeat = _cogl_texture_2d_can_hardware_repeat;
|
||||
texture_class->transform_coords_to_gl = _cogl_texture_2d_transform_coords_to_gl;
|
||||
|
@ -152,8 +152,6 @@ struct _CoglTextureClass
|
||||
CoglTextureForeachCallback callback,
|
||||
void *user_data);
|
||||
|
||||
int (* get_max_waste) (CoglTexture *tex);
|
||||
|
||||
gboolean (* is_sliced) (CoglTexture *tex);
|
||||
|
||||
gboolean (* can_hardware_repeat) (CoglTexture *tex);
|
||||
|
@ -793,15 +793,6 @@ _cogl_texture_pixmap_x11_get_data (CoglTexture *tex,
|
||||
return cogl_texture_get_data (child_tex, format, rowstride, 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_CLASS (child_tex)->get_max_waste (child_tex);
|
||||
}
|
||||
|
||||
static void
|
||||
_cogl_texture_pixmap_x11_foreach_sub_texture_in_region
|
||||
(CoglTexture *tex,
|
||||
@ -965,7 +956,6 @@ cogl_texture_pixmap_x11_class_init (CoglTexturePixmapX11Class *klass)
|
||||
texture_class->allocate = _cogl_texture_pixmap_x11_allocate;
|
||||
texture_class->set_region = _cogl_texture_pixmap_x11_set_region;
|
||||
texture_class->get_data = _cogl_texture_pixmap_x11_get_data;
|
||||
texture_class->get_max_waste = _cogl_texture_pixmap_x11_get_max_waste;
|
||||
texture_class->foreach_sub_texture_in_region = _cogl_texture_pixmap_x11_foreach_sub_texture_in_region;
|
||||
texture_class->is_sliced = _cogl_texture_pixmap_x11_is_sliced;
|
||||
texture_class->can_hardware_repeat = _cogl_texture_pixmap_x11_can_hardware_repeat;
|
||||
|
Loading…
x
Reference in New Issue
Block a user