b=709477 use precise region extents instead of loose clip extents for clip rect r=jrmuizel

This commit is contained in:
Karl Tomlinson 2012-08-18 08:43:21 +12:00
Родитель 5ed4f4071b
Коммит ed6091b3ca
4 изменённых файлов: 49 добавлений и 7 удалений

Просмотреть файл

@ -184,6 +184,8 @@ win32-ExtCreatePen-zero-size.patch: Don't pass zero width or dash lengths to Ext
d2d-repeating-gradients.patch: Minimize number of gradient stops added to handle repeating with path fills (bug 768775)
xlib-glyph-clip-region.patch: bug 709477, addressed upstream by be1ff2f45fdbc69537e513834fcffa0435e63073
==== pixman patches ====
pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv.

Просмотреть файл

@ -4811,7 +4811,7 @@ _cairo_xlib_surface_show_glyphs (void *abstract_dst,
cairo_region_num_rectangles (clip_region) == 1)
{
cairo_rectangle_int_t glyph_extents;
const cairo_rectangle_int_t *clip_extents;
cairo_rectangle_int_t clip_extents;
/* Can we do without the clip?
* Around 50% of the time the clip is redundant (firefox).
@ -4820,11 +4820,11 @@ _cairo_xlib_surface_show_glyphs (void *abstract_dst,
glyphs, num_glyphs,
&glyph_extents);
clip_extents = &clip->path->extents;
if (clip_extents->x <= glyph_extents.x &&
clip_extents->y <= glyph_extents.y &&
clip_extents->x + clip_extents->width >= glyph_extents.x + glyph_extents.width &&
clip_extents->y + clip_extents->height >= glyph_extents.y + glyph_extents.height)
cairo_region_get_extents(clip_region, &clip_extents);
if (clip_extents.x <= glyph_extents.x &&
clip_extents.y <= glyph_extents.y &&
clip_extents.x + clip_extents.width >= glyph_extents.x + glyph_extents.width &&
clip_extents.y + clip_extents.height >= glyph_extents.y + glyph_extents.height)
{
clip_region = NULL;
}

Просмотреть файл

@ -0,0 +1,40 @@
diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
--- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
+++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
@@ -4806,30 +4806,30 @@ static cairo_int_status_t
}
X_DEBUG ((display->display, "show_glyphs (dst=%x)", (unsigned int) dst->drawable));
if (clip_region != NULL &&
cairo_region_num_rectangles (clip_region) == 1)
{
cairo_rectangle_int_t glyph_extents;
- const cairo_rectangle_int_t *clip_extents;
+ cairo_rectangle_int_t clip_extents;
/* Can we do without the clip?
* Around 50% of the time the clip is redundant (firefox).
*/
_cairo_scaled_font_glyph_approximate_extents (scaled_font,
glyphs, num_glyphs,
&glyph_extents);
- clip_extents = &clip->path->extents;
- if (clip_extents->x <= glyph_extents.x &&
- clip_extents->y <= glyph_extents.y &&
- clip_extents->x + clip_extents->width >= glyph_extents.x + glyph_extents.width &&
- clip_extents->y + clip_extents->height >= glyph_extents.y + glyph_extents.height)
+ cairo_region_get_extents(clip_region, &clip_extents);
+ if (clip_extents.x <= glyph_extents.x &&
+ clip_extents.y <= glyph_extents.y &&
+ clip_extents.x + clip_extents.width >= glyph_extents.x + glyph_extents.width &&
+ clip_extents.y + clip_extents.height >= glyph_extents.y + glyph_extents.height)
{
clip_region = NULL;
}
}
status = _cairo_xlib_surface_set_clip_region (dst, clip_region);
if (unlikely (status))
goto BAIL0;

Просмотреть файл

@ -1,4 +1,4 @@
# 468496-1 will also detect bugs in video drivers.
fails-if(/Mac\x20OS\x20X\x2010\.5/.test(http.oscpu)) == 468496-1.html 468496-1-ref.html # bug 486761, 660740
random-if(bug685516) == 611498-1.html 611498-ref.html
fails-if(http.platform=="X11") == 709477-1.html 709477-1-ref.html
== 709477-1.html 709477-1-ref.html