Bug 4186 - cairo_surface_finish only calls flush if finish != NULL
Summary: cairo_surface_finish only calls flush if finish != NULL
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3
Hardware: All All
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 10:49 UTC by Christian Biesinger
Modified: 2008-10-30 14:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed fix. (1.18 KB, patch)
2006-06-13 16:47 UTC, Carl Worth
Details | Splinter Review

Description Christian Biesinger 2005-08-22 10:49:09 UTC
This is kinda an edge case, since almost all surfaces will need finish...

in cairo-surface.c, line 333, there's an early return if finish is NULL.
However, the check and call for flush is after that if. It should probably be
moved before the early return so that flush is called even when finish is null.
Comment 1 Carl Worth 2005-08-22 17:14:37 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Comment 2 Carl Worth 2006-06-13 16:47:34 UTC
Created attachment 5901 [details] [review]
Proposed fix.

Please review this patch, (also available in the 4186 branch of my personal
tree), which I can push as soon as I get a double-check on its correctness.

-Carl
Comment 3 Behdad Esfahbod 2006-06-13 22:55:40 UTC
Donno what cairo does in other cases, but in your patch it seems like if both
flush and finish calls fail, the error status on the surface is set to the
latter, not former.
Comment 4 Christian Biesinger 2006-06-14 06:29:51 UTC
Comment on attachment 5901 [details] [review]
Proposed fix.

looks ok to me other than what behdad said.
Comment 5 Chris Wilson 2008-10-30 14:50:22 UTC
This had been fixed sometime ago, pre-1.4 if my memory serves correctly - though I'd forgotten about that during the recent triage sessions...


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.