[cairo] Patch for win32 clipping crash + Visual Studio project file
Bryce Harrington
bryce at osg.samsung.com
Fri Jul 25 12:12:09 PDT 2014
On Fri, Jul 25, 2014 at 09:57:10AM +0400, LRN wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 24.07.2014 18:52, LRN wrote:
> > On 09.07.2014 1:43, Bryce W. Harrington wrote:
> >> On Tue, May 20, 2014 at 06:16:23PM +0200, z wrote:
> >>> Hi, I'm new here, please tell me if I write anything inappropriate to
> >>> this list.
> >>>
> >>> As others before me I also met a crash using cairo with a win32 dc
> >>> when it has clipping. For example:
> >>> http://lists.cairographics.org/archives/cairo/2012-October/023683.html
> >>>
> >>>
> >>>
> It took me a few hours but I figured out what the problem is. I don't
> >>> know how to post patches (i.e. just add attachment or something) so
> >>> let me paste in the diff output. (it was done with the source of the
> >>> latest stable release, 1.12.16)
> >>>
> >>> The original code could be optimized to work faster with smaller
> >>> memory usage as it is currently not really optimal, but I don't have
> >>> the time to do it. If anyone wants to, I might be able to help after I
> >>> spent so much time reading this code to make the patch. (Currently it
> >>> is better to just allocate some memory and let cairo write to it
> >>> directly.)
> >>>
> >>> I also made a project file that works with Visual Studio 2012 (and
> >>> presumably 2013) and compiles the pixman 0.32.4 / cairo 1.12.16 into
> >>> a static library without having to install other tools:
> >>> http://sourceforge.net/projects/cairosolutionvs2012/
> >>>
> >>> Here's the patch: (I don't know if the format is good, I used
> >>> winmerge to make it, but looks very similar to other patches)
> >
> >> Here's a document with some directions on how to properly format
> >> patches:
> >
> >> http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches/
> >
> >> Basically, you should generate them via `git format-patch`
> >
> > Since the OP seems to be absent, here's a beautified version of the same
> > patch, with suggested changes.
Thanks for looking at the patch and fixing it up. I don't use windows
myself, so can't test these, and the windows code is both different
enough and widely used enough, that it's highly risky for me to commit
stuff that hasn't been well vetted by someone with hands on a windows
system, based merely on my own eyeballing of the code. :-)
> There's a typo in the patch (one comma is missing, my bad - that's what
> happen when you commit code without testing whether it compiles or not).
>
> Anyway, the code itself doesn't work for me - GTK+, when using a version of
> cairo patched like this, fails to draw anything (all windows are empty).
That's a shame. But keep at it, it sounds like a few people are running
into this crash.
Like I mentioned, I'm not super comfortable integrating a patch to the
windows code by myself. But if we have two testers giving thumbs up,
and one other person (besides you and me) giving the final patch a +1 on
code review, I can pull it.
Bryce
More information about the cairo
mailing list