diff options
author | Robert Bragg <robert@linux.intel.com> | 2012-11-22 21:46:54 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2013-01-22 17:48:17 +0000 |
commit | 5a814e386aa4aac5c7e9436cb3d11c0d7ce5c677 (patch) | |
tree | 96bf760f4abada200663ccea55337a40cd4ccb44 /cogl/cogl-atlas-texture.c | |
parent | 0850eea1621a996d8b7f3b9b4a7a01425e710491 (diff) | |
download | cogl-5a814e386aa4aac5c7e9436cb3d11c0d7ce5c677.tar.gz |
texture: add width/height members to base CoglTexture
There was a lot of redundancy in how we tracked the width and height of
different texture types which is greatly simplified by adding width and
height members to CoglTexture directly and removing the get_width and
get_height vfuncs from CoglTextureVtable
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 3236e47723e4287d5e0023f29083521aeffc75dd)
Diffstat (limited to 'cogl/cogl-atlas-texture.c')
-rw-r--r-- | cogl/cogl-atlas-texture.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c index 8aacb072..c37908ad 100644 --- a/cogl/cogl-atlas-texture.c +++ b/cogl/cogl-atlas-texture.c @@ -632,24 +632,6 @@ _cogl_atlas_texture_get_gl_format (CoglTexture *tex) return _cogl_texture_gl_get_format (atlas_tex->sub_texture); } -static int -_cogl_atlas_texture_get_width (CoglTexture *tex) -{ - CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex); - - /* Forward on to the sub texture */ - return cogl_texture_get_width (atlas_tex->sub_texture); -} - -static int -_cogl_atlas_texture_get_height (CoglTexture *tex) -{ - CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex); - - /* Forward on to the sub texture */ - return cogl_texture_get_height (atlas_tex->sub_texture); -} - static CoglBool _cogl_atlas_texture_can_use_format (CoglPixelFormat format) { @@ -716,6 +698,7 @@ _cogl_atlas_texture_new_with_size (CoglContext *ctx, _cogl_texture_init (COGL_TEXTURE (atlas_tex), ctx, + width, height, &cogl_atlas_texture_vtable); atlas_tex->sub_texture = NULL; @@ -871,8 +854,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_width, - _cogl_atlas_texture_get_height, _cogl_atlas_texture_get_type, NULL, /* is_foreign */ NULL /* set_auto_mipmap */ |