static gboolean _cogl_texture_pixmap_x11_is_sliced (CoglTexture *tex) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); return cogl_texture_is_sliced (child_tex); }
static gboolean _cogl_texture_pixmap_x11_can_hardware_repeat (CoglTexture *tex) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); return _cogl_texture_can_hardware_repeat (child_tex); }
static GLenum _cogl_texture_pixmap_x11_get_gl_format (CoglTexture *tex) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); return _cogl_texture_gl_get_format (child_tex); }
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_max_waste (child_tex); }
static void _cogl_texture_pixmap_x11_ensure_non_quad_rendering (CoglTexture *tex) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ _cogl_texture_ensure_non_quad_rendering (child_tex); }
static CoglPixelFormat _cogl_texture_pixmap_x11_get_format (CoglTexture *tex) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ return _cogl_texture_get_format (child_tex); }
static void _cogl_texture_pixmap_x11_foreach_sub_texture_in_region (CoglTexture *tex, float virtual_tx_1, float virtual_ty_1, float virtual_tx_2, float virtual_ty_2, CoglMetaTextureCallback callback, void *user_data) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ /* tfp textures may be implemented in terms of a * CoglTextureRectangle texture which uses un-normalized texture * coordinates but we want to consistently deal with normalized * texture coordinates with CoglTexturePixmapX11... */ if (cogl_is_texture_rectangle (child_tex)) { NormalizeCoordsWrapperData data; int width = tex->width; int height = tex->height; virtual_tx_1 *= width; virtual_ty_1 *= height; virtual_tx_2 *= width; virtual_ty_2 *= height; data.width = width; data.height = height; data.callback = callback; data.user_data = user_data; cogl_meta_texture_foreach_in_region (COGL_META_TEXTURE (child_tex), virtual_tx_1, virtual_ty_1, virtual_tx_2, virtual_ty_2, COGL_PIPELINE_WRAP_MODE_REPEAT, COGL_PIPELINE_WRAP_MODE_REPEAT, normalize_coords_wrapper_cb, &data); } else cogl_meta_texture_foreach_in_region (COGL_META_TEXTURE (child_tex), virtual_tx_1, virtual_ty_1, virtual_tx_2, virtual_ty_2, COGL_PIPELINE_WRAP_MODE_REPEAT, COGL_PIPELINE_WRAP_MODE_REPEAT, callback, user_data); }
static CoglTransformResult _cogl_texture_pixmap_x11_transform_quad_coords_to_gl (CoglTexture *tex, float *coords) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ return _cogl_texture_transform_quad_coords_to_gl (child_tex, coords); }
static void _cogl_texture_pixmap_x11_transform_coords_to_gl (CoglTexture *tex, float *s, float *t) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ _cogl_texture_transform_coords_to_gl (child_tex, s, t); }
static gboolean _cogl_texture_pixmap_x11_get_data (CoglTexture *tex, CoglPixelFormat format, int rowstride, uint8_t *data) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ return cogl_texture_get_data (child_tex, format, rowstride, data); }
static void _cogl_texture_pixmap_x11_gl_flush_legacy_texobj_filters (CoglTexture *tex, GLenum min_filter, GLenum mag_filter) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ _cogl_texture_gl_flush_legacy_texobj_filters (child_tex, min_filter, mag_filter); }
static gboolean _cogl_texture_pixmap_x11_get_gl_texture (CoglTexture *tex, GLuint *out_gl_handle, GLenum *out_gl_target) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ return cogl_texture_get_gl_texture (child_tex, out_gl_handle, out_gl_target); }
static void _cogl_texture_pixmap_x11_pre_paint (CoglTexture *tex, CoglTexturePrePaintFlags flags) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex; _cogl_texture_pixmap_x11_update (tex_pixmap, !!(flags & COGL_TEXTURE_NEEDS_MIPMAP)); child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); _cogl_texture_pre_paint (child_tex, flags); }
static void _cogl_texture_pixmap_x11_gl_flush_legacy_texobj_wrap_modes (CoglTexture *tex, GLenum wrap_mode_s, GLenum wrap_mode_t, GLenum wrap_mode_p) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ _cogl_texture_gl_flush_legacy_texobj_wrap_modes (child_tex, wrap_mode_s, wrap_mode_t, wrap_mode_p); }
static void _cogl_texture_pixmap_x11_set_wrap_mode_parameters (CoglTexture *tex, GLenum wrap_mode_s, GLenum wrap_mode_t, GLenum wrap_mode_p) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglHandle child_tex; child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ _cogl_texture_set_wrap_mode_parameters (child_tex, wrap_mode_s, wrap_mode_t, wrap_mode_p); }
static void _cogl_texture_pixmap_x11_foreach_sub_texture_in_region (CoglTexture *tex, float virtual_tx_1, float virtual_ty_1, float virtual_tx_2, float virtual_ty_2, CoglTextureSliceCallback callback, void *user_data) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglHandle child_tex; child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); /* Forward on to the child texture */ _cogl_texture_foreach_sub_texture_in_region (child_tex, virtual_tx_1, virtual_ty_1, virtual_tx_2, virtual_ty_2, callback, user_data); }