Created attachment 18451 [details] testing sample code The following sequence produces wrong masked color: cairo_t* cr = cairo_create(target); cairo_set_source_surface(cr, source, 0, 0); cairo_paint_with_alpha(cr, alpha); cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, alpha); cairo_mask_surface(cr, mask, 0, 0); where target, source, and mask are image surfaces, and alpha is an arbitrary value other than 1.0. For example, when data is as follows: uchar sourceWhite[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; uchar maskA8[] = { 0x00,0xff,0x00,0x00 }; double alpha = 0.5; we will get this result in target surface: 80808080404040C0 while the expected should be: 80808080C0C0C0C0. Please see the attached for a sample code. (compile command was: g++ -Wall -ffast-math -g `pkg-config --cflags --libs cairo` cairo_mask.cpp g++ version: g++ (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7))
I am able to reproduce the bug with 1.6.4 and it is gone in master. Inspection and bisection point towards the solid pattern cache.
1.8.0 has been released and this regression has been fixed - thanks for the bug report!
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.