Bug 83822 - device-offset test randomly fails because XCreatePixmap bits are undefined
Summary: device-offset test randomly fails because XCreatePixmap bits are undefined
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: xlib backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-13 16:56 UTC by Massimo
Modified: 2018-08-25 13:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (980 bytes, text/plain)
2014-09-13 16:56 UTC, Massimo
Details

Description Massimo 2014-09-13 16:56:48 UTC
Created attachment 106221 [details]
proposed patch

while running

DISPLAY=:2 make test TARGETS=image,xlib

with Xvfb on display :2, to check a fix for bug #74779, occasionally
device-offset.xlib-render-0_0.rgb24 was reported PASS, even if the code
modified was not executed at all by that test.

The problem is that in that test (and few others) a temporary Pixmap is
created on the server and because render-0_0 does not have FillRectangles
an image surface is used to clear the Pixmap, but because the image surface
is already 'clear' it is left untouched and in _cairo_surface_unmap the 'clear'
image is not unmapped because untouched (image->base.serial == 0)

http://cgit.freedesktop.org/cairo/tree/src/cairo-surface.c#n688

this means X's Pixmap is left in its original undefined state and only
occasionally it is clear.

I suggest to increment the serial member of the image_surface when the
'is_clear' state of the image_surface does not correspond to a clear
content of the corresponding xlib_surface, as in the attached patch.
Comment 1 GitLab Migration User 2018-08-25 13:33:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/67.


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.