[cairo-bugs] [Bug 46255] New: Image Surface _cairo_image_surface_paint() has logic issue

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Feb 18 10:04:02 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=46255

             Bug #: 46255
           Summary: Image Surface _cairo_image_surface_paint() has logic
                    issue
    Classification: Unclassified
           Product: cairo
           Version: 1.10.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: image backend
        AssignedTo: cworth at cworth.org
        ReportedBy: ihaohu at gmail.com
         QAContact: cairo-bugs at cairographics.org


The issue is the image surface will have different rendering result than the xlib surface. 

e.g. If a circle should get clipped by a clip. On xlib surface, everything draws fine. On image surface, the circle is NOT clipped.



http://cgit.freedesktop.org/cairo/tree/src/cairo-image-surface.c?h=1.10

Under _cairo_image_surface_paint(), there are two issues:

1. line 3294 -> 3302. Logic of "(clip_path = _clip_get_single_path (clip)) != NULL)" is not correct. It just simple against the comment above that logic. Since
this will still be a valid condition even when the clip contains a set of boxes.

The same code path in _cairo_surface_fallback_paint() in cairo-surface-fallback.c should be the correct logic (line 918): "clip != NULL && clip_path->prev ==
NULL"


2. The _clip_get_single_path() in the cairo-image-surface.c, at line 3243, the return value shouldn't be "FALSE" anyway. It should be a (cairo_clip_path_t *)
value, not boolean. I suspect, it should be "path" instead.


SAME ISSUEs in cairo-xcb-surface-render.c as well.

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


More information about the cairo-bugs mailing list