[cairo] [PATCH] OS/2 surface fixes
M Joonas Pihlaja
jpihlaja at cc.helsinki.fi
Sat Aug 7 07:35:48 PDT 2010
Hey Rich,
I'm mostly offline dealing with other matters, so haven't had the
chance to get back to this until now, but last night I went over your
new patches and put them in a git repo (with some minor
editorializing.) Thanks for sorting out the points brought up before!
I've pushed the commits here, and pending your approval of my minor
edits and commit messages, they'll go right into master:
http://cgit.freedesktop.org/~joonas/cairo/log/?h=wip/os2-walsh
On 07/24/10 11:12 am, Rich Walsh wrote:
> * os2_regression.diff - patch bed2701..f3dda3c removed a block of code in
> error causing a SIG_SEGV. Patch c10a5a9..56f888cc restored one line of
> code to fix the immediate issue but failed to restore the associated
> error checking. This patch restores the code to its original state.
This is the only patch that IMHO doesn't need to be applied. Namely,
the patch adds surface type checking to the backend's extents method,
but if it happens that the backend methods are called with the wrong
surface type, then that would consistute a bug elsewhere in cairo. I
expect the intention behind the bed2701 commit's edit for this bit of
code (it's a bit of a code dump), was actually to remove the redundant
surface type check. This commit is also in my wip/os2-walsh branch,
but, unless there's some pressing need for it, I'll leave it out of
master.
> * os2_cleanup.diff - this improves error checking, eliminates redundant
> code, and ensures OS/2 APIs are used correctly.
I've split this further into the following commits:
os2: Fix clipping to bounds when blitting pixels.
os2: Tweak an inline declaration.
os2: Consolidate error paths of cairo_os2_surface_create().
os2: Document ownership of OS/2 objects passed to surfaces.
os2: Don't fake an Anchor Block when one isn't needed.
os2: Fix buffer allocator behaviour on arithmetic overflow.
Please check that the splits are sane and that the commit messages
accurately describe what the commit actually is doing and why. I had
to resort to a bit of guesswork for the commit messages. With regards
to the error path consolidation, I moved the _cairo_error() calls
closer to the source of each error and distinguished some error cases
from the default NO_MEMORY error.
> * os2_24bpp.diff - the existing code contains a work-around for older
[snip]
> * os2_newapi.diff - this introduces 3 new functions to reduce system
[snip]
These look good to me.
Thanks for your hard work to make good clean patches, and also for
your patience with the feedback! If you could do a final once over
and check that the tip of the wip/os2-walsh branch compiles cleanly
for you, that'd be great and we'll push to master.
Cheers,
Joonas
More information about the cairo
mailing list