From ca87a319db951084c8fd4eb7ef5ca0b88ec71245 Mon Sep 17 00:00:00 2001 From: "bbaetz%cs.mcgill.ca" Date: Sat, 24 Nov 2001 19:50:23 +0000 Subject: [PATCH] Bug 110976 - libart's art_render doesn't fill certain paths correctly. Patch by james.turner@crocodile-clips.com, not part of build. git-svn-id: svn://10.0.0.236/trunk@108859 18797224-902f-48f8-a5cc-f745e15eee43 --- .../libart_lgpl/art_render_svp.c | 60 +++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/mozilla/other-licenses/libart_lgpl/art_render_svp.c b/mozilla/other-licenses/libart_lgpl/art_render_svp.c index 885f66b4166..98ed26f594d 100644 --- a/mozilla/other-licenses/libart_lgpl/art_render_svp.c +++ b/mozilla/other-licenses/libart_lgpl/art_render_svp.c @@ -105,7 +105,17 @@ art_render_svp_callback (void *callback_data, int y, run[n_run].alpha = 0x8000; n_run++; } - } + } else { + + if (running_sum > 0x80ff) { + run[0].x = x0; + run[0].alpha = running_sum; + + run[1].x = x1; + run[1].alpha = 0x8000; + n_run = 2; + } + } render->n_run = n_run; @@ -172,7 +182,22 @@ art_render_svp_callback_span (void *callback_data, int y, n_run++; span_x[n_span++] = x1; } - } + } else { + + if (running_sum > 0x80ff) { + run[0].x = x0; + run[0].alpha = running_sum; + + run[1].x = x1; + run[1].alpha = 0x8000; + n_run = 2; + + /* fix the spans too */ + span_x[0] = x0; + span_x[1] = x1; + n_span = 2; + } + } render->n_run = n_run; render->n_span = n_span; @@ -238,7 +263,18 @@ art_render_svp_callback_opacity (void *callback_data, int y, run[n_run].alpha = 0x8000; n_run++; } - } + } else { + alpha = (running_sum >> 16) & 0xff; + if (alpha) { + run[0].x = x0; + alpha = ((running_sum >> 8) * opacity + 0x80080) >> 8; + run[0].alpha = alpha; + + run[1].x = x1; + run[1].alpha = 0x8000; + n_run = 2; + } + } render->n_run = n_run; @@ -312,7 +348,23 @@ art_render_svp_callback_opacity_span (void *callback_data, int y, n_run++; span_x[n_span++] = x1; } - } + } else { + alpha = (running_sum >> 16) & 0xff; + if (alpha) { + run[0].x = x0; + alpha = ((running_sum >> 8) * opacity + 0x80080) >> 8; + run[0].alpha = alpha; + + run[1].x = x1; + run[1].alpha = 0x8000; + n_run = 2; + + /* fix the spans too */ + span_x[0] = x0; + span_x[1] = x1; + n_span = 2; + } + } render->n_run = n_run; render->n_span = n_span;