third_party/cairo/src/cairo-gl-shaders.c
static cairo_bool_t
_cairo_gl_shader_cache_equal_gles2 (const void *key_a, const void *key_b)
{
    const cairo_shader_cache_entry_t *a = key_a;
    const cairo_shader_cache_entry_t *b = key_b;
    cairo_bool_t both_have_npot_repeat =
	a->ctx->has_npot_repeat && b->ctx->has_npot_repeat;

    return (a->vertex == b->vertex &&
	    a->src  == b->src  &&
	    a->mask == b->mask &&
	    a->dest == b->dest &&
	    a->use_coverage == b->use_coverage &&
	    a->in   == b->in   &&
	    a->src_gl_filter == b->src_gl_filter &&
	    a->src_border_fade == b->src_border_fade &&
	    (both_have_npot_repeat || a->src_extend == b->src_extend) &&
	    a->mask_gl_filter == b->mask_gl_filter &&
	    a->mask_border_fade == b->mask_border_fade &&
	    (both_have_npot_repeat || a->mask_extend == b->mask_extend));
}
/*
 * For GLES2 we use more complicated shaders to implement missing GL
 * features. In this case we need more parameters to uniquely identify
 * a shader (vs _cairo_gl_shader_cache_equal_desktop()).
 */
For GLES2 we use more complicated shaders to implement missing GL
features. In this case we need more parameters to uniquely identify
a shader (vs _cairo_gl_shader_cache_equal_desktop()).
For GLES2 we use more complicated shaders to implement missing GL features . In this case we need more parameters to uniquely identify a shader ( vs _cairo_gl_shader_cache_equal_desktop () ) .
static cairo_bool_t
_cairo_gl_shader_cache_equal_gles2 (const void *key_a, const void *key_b)
{
    const cairo_shader_cache_entry_t *a = key_a;
    const cairo_shader_cache_entry_t *b = key_b;
    cairo_bool_t both_have_npot_repeat =
	a->ctx->has_npot_repeat && b->ctx->has_npot_repeat;
    return (a->vertex == b->vertex &&
	    a->src  == b->src  &&
	    a->mask == b->mask &&
	    a->dest == b->dest &&
	    a->use_coverage == b->use_coverage &&
	    a->in   == b->in   &&
	    a->src_gl_filter == b->src_gl_filter &&
	    a->src_border_fade == b->src_border_fade &&
	    (both_have_npot_repeat || a->src_extend == b->src_extend) &&
	    a->mask_gl_filter == b->mask_gl_filter &&
	    a->mask_border_fade == b->mask_border_fade &&
	    (both_have_npot_repeat || a->mask_extend == b->mask_extend));
}
static cairo_bool_t _cairo_gl_shader_cache_equal_gles2 ( const void * key_a , const void * key_b ) { const cairo_shader_cache_entry_t * a = key_a ; const cairo_shader_cache_entry_t * b = key_b ; cairo_bool_t both_have_npot_repeat = a -> ctx -> has_npot_repeat && b -> ctx -> has_npot_repeat ; return ( a -> vertex == b -> vertex && a -> src == b -> src && a -> mask == b -> mask && a -> dest == b -> dest && a -> use_coverage == b -> use_coverage && a -> in == b -> in && a -> src_gl_filter == b -> src_gl_filter && a -> src_border_fade == b -> src_border_fade && ( both_have_npot_repeat || a -> src_extend == b -> src_extend ) && a -> mask_gl_filter == b -> mask_gl_filter && a -> mask_border_fade == b -> mask_border_fade && ( both_have_npot_repeat || a -> mask_extend == b -> mask_extend ) ) ; }
For GLES2 we use more complicated shaders to implement missing GL
 features.
For GLES2 we use more complicated shaders to implement missing GL features .