Bug 61592

Summary: Cairo works strange with complex clip
Product: cairo Reporter: Seongwon Cho <seongwon1.cho>
Component: image backendAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: critical    
Priority: medium CC: michael.fu, psychon
Version: 1.12.14   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: codes to reproduce problem.
What is wrong and What I expected...
Possible fix for this problem.

Description Seongwon Cho 2013-02-28 09:01:06 UTC
Created attachment 75670 [details]
codes to reproduce problem.

Hi,

Please find attached soruce code to produce problem.

Actually Cairo works strange with complex clip.
I have 2 clips which have different AA option.
And When I call cairo_paint() I got strange result.

If set both AA option makes same, problem is gone.
I also attached the png file (strange result).

Please check it!

Thanks a lot.
Comment 1 Uli Schlachter 2013-03-11 22:21:26 UTC
Could you please also tell us why the result is strange and what you would expect instead?
Comment 2 Seongwon Cho 2013-03-12 11:28:32 UTC
Created attachment 76389 [details]
What is wrong and What I expected...

I attached new 5 png files.

1-clip.png is first clip in my sample.
2-clip.png is second clip in my sample.
intersect-clip.png is intersection of first & second clip.
What_I_expect.png is What I expected result of intersected clip
  - Actually mask of Cairo.
wrong_result.png is current result of intersected clip(mask) with Cairo.
  - You can find strange thin & transparent line below Trapezoida.

Thank you.
Comment 3 Uli Schlachter 2013-03-12 13:12:53 UTC
Created attachment 76401 [details] [review]
Possible fix for this problem.

Sorry, I didn't notice that line before.

Via some printf-debugging I came up with the attached patch. It seems to fix this issue, but I am not really sure about this. Also, someone should make sure that a suitable test gets added to the test suite, I guess.

Chris? :-)
Comment 4 Seongwon Cho 2013-03-12 13:29:21 UTC
Thank you for your quick response.
I will test it. 
Thans a lot. :)
Comment 5 Uli Schlachter 2013-07-05 20:21:19 UTC
Fixed with commit 2170bdbb12f38e372ea2ce1c6492c60cb35f22e4.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.