summaryrefslogtreecommitdiff
path: root/cogl/winsys/cogl-winsys-glx.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-04-16 14:14:10 +0100
committerRobert Bragg <robert@linux.intel.com>2012-08-06 14:27:39 +0100
commit09642a83b5f036756c7625ade7cf57358396baec (patch)
tree9eede7db7022ece69e2ab532e283c683b9792b9e /cogl/winsys/cogl-winsys-glx.c
parent097d282b324df663e275e1f65ea7b6c65bab87fc (diff)
downloadcogl-09642a83b5f036756c7625ade7cf57358396baec.tar.gz
Removes all remaining use of CoglHandle
Removing CoglHandle has been an on going goal for quite a long time now and finally this patch removes the last remaining uses of the CoglHandle type and the cogl_handle_ apis. Since the big remaining users of CoglHandle were the cogl_program_ and cogl_shader_ apis which have replaced with the CoglSnippets api this patch removes both of these apis. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 6ed3aaf4be21d605a1ed3176b3ea825933f85cf0) Since the original patch was done after removing deprecated API this back ported patch doesn't affect deprecated API and so actually this cherry-pick doesn't remove all remaining use of CoglHandle as it did for the master branch of Cogl.
Diffstat (limited to 'cogl/winsys/cogl-winsys-glx.c')
-rw-r--r--cogl/winsys/cogl-winsys-glx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index b8ba90d9..4e0abfa9 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -88,7 +88,7 @@ typedef struct _CoglTexturePixmapGLX
gboolean has_mipmap_space;
gboolean can_mipmap;
- CoglHandle glx_tex;
+ CoglTexture *glx_tex;
gboolean bind_tex_image_queued;
gboolean pixmap_bound;
@@ -1715,7 +1715,7 @@ _cogl_winsys_texture_pixmap_x11_create (CoglTexturePixmapX11 *tex_pixmap)
glx_tex_pixmap->can_mipmap = FALSE;
glx_tex_pixmap->has_mipmap_space = FALSE;
- glx_tex_pixmap->glx_tex = COGL_INVALID_HANDLE;
+ glx_tex_pixmap->glx_tex = NULL;
glx_tex_pixmap->bind_tex_image_queued = TRUE;
glx_tex_pixmap->pixmap_bound = FALSE;
@@ -1793,7 +1793,7 @@ _cogl_winsys_texture_pixmap_x11_free (CoglTexturePixmapX11 *tex_pixmap)
free_glx_pixmap (ctx, glx_tex_pixmap);
if (glx_tex_pixmap->glx_tex)
- cogl_handle_unref (glx_tex_pixmap->glx_tex);
+ cogl_object_unref (glx_tex_pixmap->glx_tex);
tex_pixmap->winsys = NULL;
g_free (glx_tex_pixmap);
@@ -1817,7 +1817,7 @@ _cogl_winsys_texture_pixmap_x11_update (CoglTexturePixmapX11 *tex_pixmap,
glx_renderer = ctx->display->renderer->winsys;
/* Lazily create a texture to hold the pixmap */
- if (glx_tex_pixmap->glx_tex == COGL_INVALID_HANDLE)
+ if (glx_tex_pixmap->glx_tex == NULL)
{
CoglPixelFormat texture_format;
GError *error = NULL;
@@ -1828,12 +1828,12 @@ _cogl_winsys_texture_pixmap_x11_update (CoglTexturePixmapX11 *tex_pixmap,
if (should_use_rectangle (ctx))
{
- glx_tex_pixmap->glx_tex =
+ glx_tex_pixmap->glx_tex = COGL_TEXTURE (
cogl_texture_rectangle_new_with_size (ctx,
tex_pixmap->width,
tex_pixmap->height,
texture_format,
- &error);
+ &error));
if (glx_tex_pixmap->glx_tex)
COGL_NOTE (TEXTURE_PIXMAP, "Created a texture rectangle for %p",
@@ -1850,12 +1850,12 @@ _cogl_winsys_texture_pixmap_x11_update (CoglTexturePixmapX11 *tex_pixmap,
}
else
{
- glx_tex_pixmap->glx_tex =
+ glx_tex_pixmap->glx_tex = COGL_TEXTURE (
cogl_texture_2d_new_with_size (ctx,
tex_pixmap->width,
tex_pixmap->height,
texture_format,
- NULL);
+ NULL));
if (glx_tex_pixmap->glx_tex)
COGL_NOTE (TEXTURE_PIXMAP, "Created a texture 2d for %p",
@@ -1895,7 +1895,7 @@ _cogl_winsys_texture_pixmap_x11_update (CoglTexturePixmapX11 *tex_pixmap,
"with mipmap support failed", tex_pixmap);
if (glx_tex_pixmap->glx_tex)
- cogl_handle_unref (glx_tex_pixmap->glx_tex);
+ cogl_object_unref (glx_tex_pixmap->glx_tex);
return FALSE;
}
@@ -1953,7 +1953,7 @@ _cogl_winsys_texture_pixmap_x11_damage_notify (CoglTexturePixmapX11 *tex_pixmap)
glx_tex_pixmap->bind_tex_image_queued = TRUE;
}
-static CoglHandle
+static CoglTexture *
_cogl_winsys_texture_pixmap_x11_get_texture (CoglTexturePixmapX11 *tex_pixmap)
{
CoglTexturePixmapGLX *glx_tex_pixmap = tex_pixmap->winsys;