Actually remove cairo_has_show_text_glyphs

The release notes for 1.7.6 say that we had dropped this
function, but apparently we had only planned to do that
and didn't actually get around to it until now.

Thanks to the RELEASING insctructions which gave a diff
command that pointed out this problem.
This commit is contained in:
Carl Worth 2008-09-25 15:40:28 -07:00
parent 483ab915c0
commit 1d896aa9d8
6 changed files with 6 additions and 55 deletions

View file

@ -408,7 +408,6 @@ cairo_set_scaled_font
cairo_get_scaled_font
cairo_show_text
cairo_show_glyphs
cairo_has_show_text_glyphs
cairo_show_text_glyphs
cairo_font_extents
cairo_text_extents

View file

@ -197,15 +197,6 @@ Cairo has two sets of text rendering capabilities:
@num_glyphs:
<!-- ##### FUNCTION cairo_has_show_text_glyphs ##### -->
<para>
</para>
@cr:
@Returns:
<!-- ##### FUNCTION cairo_show_text_glyphs ##### -->
<para>

View file

@ -1536,12 +1536,6 @@ _cairo_gstate_glyph_extents (cairo_gstate_t *gstate,
return cairo_scaled_font_status (gstate->scaled_font);
}
cairo_bool_t
_cairo_gstate_has_show_text_glyphs (cairo_gstate_t *gstate)
{
return cairo_surface_has_show_text_glyphs (gstate->target);
}
cairo_status_t
_cairo_gstate_show_text_glyphs (cairo_gstate_t *gstate,
const char *utf8,
@ -1600,7 +1594,7 @@ _cairo_gstate_show_text_glyphs (cairo_gstate_t *gstate,
* fast rasterizer in cairo, we may want to readjust this.
*
* Needless to say, do this only if show_text_glyphs is not available. */
if (_cairo_gstate_has_show_text_glyphs (gstate) ||
if (cairo_surface_has_show_text_glyphs (gstate->target) ||
_cairo_scaled_font_get_max_scale (gstate->scaled_font) <= 10240) {
status = _cairo_surface_show_text_glyphs (gstate->target,
gstate->op,

View file

@ -3079,6 +3079,7 @@ cairo_show_text (cairo_t *cr, const char *utf8)
int utf8_len, num_glyphs, num_clusters;
cairo_text_cluster_flags_t cluster_flags;
double x, y;
cairo_bool_t has_show_text_glyphs;
if (cr->status)
return;
@ -3090,11 +3091,14 @@ cairo_show_text (cairo_t *cr, const char *utf8)
utf8_len = strlen (utf8);
has_show_text_glyphs =
cairo_surface_has_show_text_glyphs (cairo_get_target (cr));
status = _cairo_gstate_text_to_glyphs (cr->gstate,
x, y,
utf8, utf8_len,
&glyphs, &num_glyphs,
cairo_has_show_text_glyphs (cr) ? &clusters : NULL, &num_clusters,
has_show_text_glyphs ? &clusters : NULL, &num_clusters,
&cluster_flags);
if (status)
goto BAIL;
@ -3169,36 +3173,6 @@ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
_cairo_set_error (cr, status);
}
/**
* cairo_has_show_text_glyphs:
* @cr: a cairo context
*
* Returns whether the target surface of a cairo context supports
* sophisticated cairo_show_text_glyphs() operations. That is,
* whether it actually uses the provided text and cluster data
* to a cairo_show_text_glyphs() call.
*
* Note: Even if this function returns %FALSE, a
* cairo_show_text_glyphs() operation will still succeed. It just will
* act like a cairo_show_glyphs() operation. Users can use this
* function to avoid computing UTF-8 text and cluster mapping if the
* target surface does not use it.
*
* This is a convenience function that simply calls
* cairo_surface_has_show_text_glyphs() on @cr's target.
*
* Return value: %TRUE if the target surface of @cr supports
* cairo_show_text_glyphs(), %FALSE otherwise
*
* Since: 1.8
**/
cairo_bool_t
cairo_has_show_text_glyphs (cairo_t *cr)
{
return _cairo_gstate_has_show_text_glyphs (cr->gstate);
}
slim_hidden_def (cairo_has_show_text_glyphs);
/**
* cairo_show_text_glyphs:
* @cr: a cairo context

View file

@ -1209,9 +1209,6 @@ cairo_show_text (cairo_t *cr, const char *utf8);
cairo_public void
cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
cairo_public cairo_bool_t
cairo_has_show_text_glyphs (cairo_t *cr);
cairo_public void
cairo_show_text_glyphs (cairo_t *cr,
const char *utf8,

View file

@ -1238,9 +1238,6 @@ _cairo_gstate_glyph_extents (cairo_gstate_t *gstate,
int num_glyphs,
cairo_text_extents_t *extents);
cairo_private cairo_bool_t
_cairo_gstate_has_show_text_glyphs (cairo_gstate_t *gstate);
cairo_private cairo_status_t
_cairo_gstate_show_text_glyphs (cairo_gstate_t *gstate,
const char *utf8,
@ -2389,7 +2386,6 @@ slim_hidden_proto (cairo_get_current_point);
slim_hidden_proto (cairo_get_matrix);
slim_hidden_proto (cairo_get_target);
slim_hidden_proto (cairo_get_tolerance);
slim_hidden_proto (cairo_has_show_text_glyphs);
slim_hidden_proto (cairo_glyph_allocate);
slim_hidden_proto (cairo_glyph_free);
slim_hidden_proto (cairo_image_surface_create);