[cairo] Getting mozilla-specific changes merged in

Carl Worth cworth at cworth.org
Thu May 18 17:49:13 PDT 2006

On Wed, 17 May 2006 17:23:38 -0700, Carl Worth wrote:
> So I've made an attempt at resolving the mozilla branch myself. My
> attempt is in the mozilla-rebuilt branch within my personal tree. It
> should be fetchable with:
> From a quick skim, it looks like most of what I've put in this branch,
> (again, except for the public API changes: get_group_target and
> extract_clip), could likely be pushed out to the master branch right
> away. But I'll leave that to Vlad or others who have more "ownership"
> of these changes than I do.

So I lied. I've gone ahead and pushed out some of this branch.  I
reviewed/tested the two remaining xlib-specific changes and pushed
them, (Robert and I just got finished doing the third). Then I blindly
pushed the win32-specific changes, (well, I did look a little bit at
the one that adds new public API to cairo-win32.h, and it looks
totally reasonable to me). The new API is:

	cairo_public cairo_font_face_t *
	cairo_win32_font_face_create_for_hfont (HFONT font);

Meanwhile, here's what the mozilla-rebuilt branch looks like now:

$ git cherry -v cairo mozilla-rebuilt
+ a2c80bdf0a642e0ba5450107d2096cf44350124f [xlib] implement _cairo_xlib_surface_show_glyphs
- f49aac02e1490208aec14847c0637ec27ebff660 [win32] Add SHADEBLENDCAPS and SB_NONE definitions for older SDKs
- 7776e1a038d26599e9fcd362a456fca71ae62a4c [win32] Allow for creating a font from a HFONT
- 45ca41d5bb706a154018f16e47a2f7ae25e29a76 [win32] implement win32 show_glyphs
+ c94afe2f968187b32216d1f982b4a1f123aa7082 Misc compilation bits for Mozilla's in-tree cairo version. Mainly
+ 81290c92397d1a4833d874bd455cd4f71f8913fc Added cairo-platform.h
+ 2cdb2710bad7b3aa78e5871c5143f43fce75128c Allow querying clip state from cairo_t (rectangles only)
- f0ba5e85212052db9098743e1615bab35f80dc45 [xlib] Have create_similar try harder to create the right surface
+ 0391169ccdee7043b81b9252f2349b92da0ced98 Add bandaid for fbCompose memory corruption
+ ddb07caa26e6552dbe30710cca7e0ca857127dbe Define kCGBitmapByteOrder32Host for when the SDK doesn't define it
+ f6f6e28b5176c5d661d651da0a24d6f523310538 Remove "static inline" from cairo-font-subset.c
- e514bfc5efa025ff4dab6912ae6eaaf723786657 [win32] fix win32_show_glyphs glyph offsets
+ ced7187d3cd2db61d19107f0c030fb4000b537e8 Add modify cairo_get_group_target() to return device offsets
- cb42a1652600ef9ad572069a64e863c6c1c2ce88 [win32] Add GdiFlush() calls after DIB creation, as per MSDN docs
+ 4ad12817cef8938ce0d066afe862c4d2d982b487 Whitespace fix
+ 29292d2db0c2bcd9d786437ce264bd4be9589946 CAIRO_SCALED_FONT_TYPE_* -> CAIRO_FONT_TYPE_*
- 9f49db4b74d641a0cb4b07ce5a0778393895c073 [win32] GDI is nearly always faster than pixman; use it whenever possible
+ d3a9b13d6784031648a7e5d02bfbc637a80432f1 [xlib] only do glyph extents computation if non-solid source.

The commits with '-' are the ones that git-cherry could detect have
been merged up into cairo master. The '+' other ones are things that
still need to be looked at. Of those, the first and last, that are
xlib-specific are already merged, (but git-cherry couldn't tell
because they didn't apply cleanly and I had to do some conflict
resolution to make them go).

So then there are only 9 patches left. Two of these are the ones I've
identified as needing some more discussion or revision:

	2cdb2710bad7 Allow querying clip state from cairo_t (rectangles only)
	ced7187d3cd2 Add modify cairo_get_group_target() to return device offsets

I owe Robert a reply on the first of those, and Vladimir owes me a
reply on the second.

From the description, a couple of these patches look like things that
belong only in Mozilla's tree:

	c94afe2f9681 Misc compilation bits for Mozilla's in-tree cairo version. Mainly
	81290c92397d Added cairo-platform.h

And the last 5 will probably all be candidates for "obvious, just
push" but I won't look at these until later (please feel free to beat
me to it, anyone.)

	0391169ccdee Add bandaid for fbCompose memory corruption
	ddb07caa26e6 Define kCGBitmapByteOrder32Host for when the SDK doesn't define it
	f6f6e28b5176 Remove "static inline" from cairo-font-subset.c
	4ad12817cef8 Whitespace fix

> PS. I'm just building mozilla against this branch now. When that's
> done I'll follow up to show how PDF output from it is looking with
> both the recent type3 stuff as well as Kristian's TrueType font
> embedding.

Mozilla actually builds fine against the branch, but the printing is
triggering a bug in my type3 font support (it looks specific to the
font used to print the timestamps, etc. in the corners of the page).
It looks like the PDF emit_glyph function is not able to find either a
path or an image for the relevant scaled glyphs.

That is, _cairo_scaled_glyph_lookup is returning a non-SUCCES status
value when called with both CAIRO_SCALED_GLYPH_INFO_PATH or
CAIRO_SCALED_GLYPH_INFO_SURFACE. That doesn't really make a lot of
sense, but I hope it should be easy enough to track down soon.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060518/5035973c/attachment.pgp

More information about the cairo mailing list