[cairo] Making final cairo_show_page redundant
behdad at behdad.org
Wed Feb 28 11:34:59 PST 2007
On Tue, 2007-02-27 at 23:14 -0800, Carl Worth wrote:
> On Tue, 27 Feb 2007 21:45:27 -0500, Behdad Esfahbod wrote:
> > In preparation for 1.4.0, I want to commit the attached patch to make a
> > final cairo_show_page() unnecessary. Please review.
> Fabulous! This is something I've been wanting for quite some
> time. Thanks for actually sitting down and doing it, (you've been
> doing that for a lot of little issues lately which I really
You are more than welcome :).
> > + if (!surface->page_is_blank)
> > + status = _cairo_paginated_surface_show_page (abstract_surface);
> And isn't it great when a feature really is as simple as that?
> I haven't run this at all, but it sure seems good to me.
> > @@ -287,8 +287,6 @@ cairo_test_for_target (cairo_test_t *test,
> > goto UNWIND_CAIRO;
> > }
> > - cairo_show_page (cr);
> And this part ensures that the test suite picks up testing of the new
Yes, and it revealed a few failures. One problem was with the test
nil-surface. It was not doing any drawing operations and causing in
zero-page invalid PS/PDF. To fix that, I made cairo-paginated also
issue a show_page() if no show_page was done ever. That is, no
The other failure was in the test-paginated surface test code. Fixed
that by forcing an early show_page too (which had to go through a
temporary cairo_t, since there's no cairo_surface_show_page(), and
cairo_surface_finish() is not idempotent).
> So, thanks again! Please push it out.
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo