[Webkit-unassigned] [Bug 108897] [Cairo] Canvas-shadow behavior is not being as expected

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 7 08:17:17 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=108897





--- Comment #61 from Martin Robinson <mrobinson at webkit.org>  2013-05-07 08:15:39 PST ---
(In reply to comment #60)

> static void drawPatternToCairoContext(cairo_t* cr, cairo_pattern_t* pattern, const FloatRect& destRect, float alpha)
> {
>     cairo_translate(cr, destRect.x(), destRect.y());
>     cairo_set_source(cr, pattern);
>     cairo_save(cr);     //Save cairo-state 
>     cairo_new_path(cr); //Clear the cairo-path
>     cairo_rectangle(cr, 0, 0, destRect.width(), destRect.height());
> 
>     if (alpha < 1) {
>         cairo_clip(cr);
>         cairo_paint_with_alpha(cr, alpha);
>     } else
>         cairo_fill(cr);
>     cairo_restore(cr); //Restore the cairo-state and hence the cairo-path
> }

This seems like the real bug now. :) I do not believe the path is saved and restored when you call cairo_save and cairo_restore. Where is the original part of the path defined?

> I ran all the canvas layouttests, with the above fix. Its working fine. I have not run all other layouttests. Is there a way to quickly compare the layout test results, with and without the fix?

You're going to need to be very careful, because I do not think the original path is on the context when you call cairo_restore. Try to figure out what sets the path.

> There seems to be an issue with the bilinear filter in cairo. Please check https://bugs.webkit.org/show_bug.cgi?id=108897#c50 . Please open the images (mentioned in comment#50), using "Image Viewer" on linux which shows the image with a checker-box background. This background will highlight the issue.

It looks like a bug because the left side of the image seems to be sampling outside the original swatch. That's what you are trying to direct me to look at, right? If this happens with the bilinear filter and not the nearest neighbor filter, it seems like a bug in Cairo for sure.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list