Closed Bug 296463 Opened 19 years ago Closed 19 years ago

update gfx/cairo to cairo 0.5

Categories

(Core Graveyard :: GFX, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vlad, Assigned: vlad)

Details

Attachments

(3 files, 2 obsolete files)

Three separate patches here, based on roc's work moving things to cairo 0.5.  I
only have the changes to gfx/cairo and to canvas and svg here -- I figure roc
can land his gfx/src/cairo work separately, since it's not part of the build.
This patch brings gfx/cairo up to 0.5.0/pixman 0.1.5.
Assignee: general → vladimir
Status: NEW → ASSIGNED
Attachment #185225 - Flags: superreview?(roc)
Attachment #185225 - Flags: review?(pavlov)
This patch brings canvas up to cairo 0.5.0.  There's a significant performance
improvement with this patch (like 3-4x), and I have followup patches later that
will improve performance even more.
Attachment #185226 - Flags: review?(pavlov)
Attached patch svg-update.patch (obsolete) — Splinter Review
SVG update for cairo 0.5.0, based on roc's patches.
Attachment #185227 - Flags: review?(tor)
Flags: blocking1.8b3+
Comment on attachment 185225 [details] [diff] [review]
cairo-update.patch

Looks great.

I have additional patches to cairo to fix a clipping bug, but we can land that
later.
Attachment #185225 - Flags: superreview?(roc)
Attachment #185225 - Flags: superreview+
Attachment #185225 - Flags: review?(pavlov)
Attachment #185225 - Flags: review+
Attachment #185225 - Flags: approval1.8b3?
Something odd is happening with the svg patch - some strokes are vanishing.
(In reply to comment #5)
> Something odd is happening with the svg patch - some strokes are vanishing.

Hmm, take a look at the dash-dos.diff -- I forgot to mention that I had to
comment out the alpha modulation if dashes are invisible, since alpha is no
longer stored as a gstate member.   I don't /think/ this is causing the stroke
disappearing, but I'm not positive.
Attached patch additional svg patch (obsolete) — Splinter Review
cairo's save/restore behavior with respect to paths changed.  This
additional patch atop the other svg one is needed.
Comment on attachment 185227 [details] [diff] [review]
svg-update.patch

>--- layout/xul/base/src/Makefile.in	monotone
>+++ layout/xul/base/src/Makefile.in	monotone
>@@ -150,7 +150,7 @@
> 
> DEFINES += -D_IMPL_NS_LAYOUT
> 
>-ifdef MOZ_CAIRO
>+ifdef MOZ_ENABLE_CAIRO
> CFLAGS		+= $(MOZ_CAIRO_CFLAGS)
> CXXFLAGS	+= $(MOZ_CAIRO_CFLAGS)
> endif

If this bit of the patch is still needed, that should probably read
MOZ_ENABLE_CANVAS.

With that and the attached additional patch for save/restore, r=tor.
Attachment #185227 - Flags: review?(tor) → review+
Comment on attachment 185227 [details] [diff] [review]
svg-update.patch

SVG images and group opacity are also broken (surface code).
Attachment #185227 - Flags: review+ → review-
Also problems with text positioning on partial redraws (drag another window
across  mozilla displaying svg text).
SVG images and group opacity can be fixed by passing 0,0 instead of width,height
to the two calls to cairo_set_source_surface() in nsSVGCairoCanvas.cpp.
Text positioning problem can be fixed by replacing the cairo_transform() in
nsSVGCairoGlyphGeometry::GetGlobalTransfrom() with cairo_set_matrix().
Group opacity broken for partial updates.  Test url:

http://www.w3.org/Graphics/SVG/Test/20030813/htmlframe/full-masking-opacity-01-b.html
Attachment #185227 - Attachment is obsolete: true
Attachment #185276 - Attachment is obsolete: true
Attachment #185284 - Flags: review?(roc)
Attachment #185284 - Attachment description: combine previous fixes plus group opacity partial update fix → replacement svg patch (includes all fixes plus group opacity partial update fix)
Attachment #185284 - Flags: review?(roc) → review+
I'll land all this late tonight, when I can have a quiet half hour or so with
the tinderbox.  I'll probably land cairo 0.5.0 first and tag gfx/cairo, and then
apply our patches on top as a separate commit.
Checked in, albeit grudgingly on OSX and Win32 -- both of them had crazy
#include issues, and I don't have an OSX build environment set up and my win32
desktop died yesterday.  I bandaided the issues, but I'll try to figure out
what's really happening in the next week or so.  (The bandaids shouldn't affect
any functionality, they just shouldn't be needed.)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Pretty sure this broke drawWindow, at least on Win32, see bug 296697
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: