Bug 61592 - Cairo works strange with complex clip
Summary: Cairo works strange with complex clip
Alias: None
Product: cairo
Classification: Unclassified
Component: image backend (show other bugs)
Version: 1.12.14
Hardware: All Linux (All)
: medium critical
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
Depends on:
Reported: 2013-02-28 09:01 UTC by Seongwon Cho
Modified: 2013-07-05 20:21 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

codes to reproduce problem. (6.42 KB, text/plain)
2013-02-28 09:01 UTC, Seongwon Cho
What is wrong and What I expected... (32.18 KB, image/png)
2013-03-12 11:28 UTC, Seongwon Cho
Possible fix for this problem. (784 bytes, patch)
2013-03-12 13:12 UTC, Uli Schlachter
Details | Splinter Review

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


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.