gboolean cogl_texture_pixmap_x11_is_using_tfp_extension (CoglHandle handle) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (handle); if (!cogl_is_texture_pixmap_x11 (tex_pixmap)) return FALSE; return !!tex_pixmap->winsys; }
/** * clutter_glx_texture_pixmap_using_extension: * @texture: A #ClutterGLXTexturePixmap * * Checks whether @texture is using the GLX_EXT_texture_from_pixmap * extension; this extension can be optionally (though it is strongly * encouraged) implemented as a zero-copy between a GLX pixmap and * a GL texture. * * Return value: %TRUE if the texture is using the * GLX_EXT_texture_from_pixmap OpenGL extension or falling back to the * slower software mechanism. * * Deprecated: 1.6: Use cogl_texture_pixmap_x11_is_using_tfp_extension() * on the texture handle instead. * * Since: 0.8 */ gboolean clutter_glx_texture_pixmap_using_extension (ClutterGLXTexturePixmap *texture) { CoglHandle cogl_texture; g_return_val_if_fail (CLUTTER_GLX_IS_TEXTURE_PIXMAP (texture), FALSE); cogl_texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (texture)); return (cogl_is_texture_pixmap_x11 (cogl_texture) && cogl_texture_pixmap_x11_is_using_tfp_extension (cogl_texture)); }
gboolean cogl_texture_pixmap_x11_is_using_tfp_extension (CoglHandle handle) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (handle); if (!cogl_is_texture_pixmap_x11 (tex_pixmap)) return FALSE; #ifdef COGL_HAS_GLX_SUPPORT return tex_pixmap->glx_pixmap != None; #else return FALSE; #endif }
void cogl_texture_pixmap_x11_set_damage_object (CoglHandle handle, guint32 damage, CoglTexturePixmapX11ReportLevel report_level) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (handle); _COGL_GET_CONTEXT (ctxt, NO_RETVAL); if (!cogl_is_texture_pixmap_x11 (tex_pixmap)) return; if (ctxt->winsys.damage_base >= 0) set_damage_object_internal (tex_pixmap, damage, report_level); }
void cogl_texture_pixmap_x11_update_area (CoglHandle handle, int x, int y, int width, int height) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (handle); const CoglWinsysVtable *winsys; if (!cogl_is_texture_pixmap_x11 (handle)) return; /* We'll queue the update for both the GLX texture and the regular texture because we can't determine which will be needed until we actually render something */ winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap); winsys->texture_pixmap_x11_damage_notify (tex_pixmap); cogl_damage_rectangle_union (&tex_pixmap->damage_rect, x, y, width, height); }
void cogl_texture_pixmap_x11_update_area (CoglHandle handle, int x, int y, int width, int height) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (handle); if (!cogl_is_texture_pixmap_x11 (handle)) return; /* We'll queue the update for both the GLX texture and the regular texture because we can't determine which will be needed until we actually render something */ #ifdef COGL_HAS_GLX_SUPPORT tex_pixmap->bind_tex_image_queued = TRUE; #endif cogl_damage_rectangle_union (&tex_pixmap->damage_rect, x, y, width, height); }