Closed Bug 306801 Opened 19 years ago Closed 16 years ago

convert canvas to Thebes

Categories

(Core :: Graphics: Canvas2D, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Assigned: ebutler)

References

Details

Attachments

(2 files, 1 obsolete file)

the <canvas> impl needs to be converted to use thebes instead of cairo directly,
so that eventually we can stop exporting cairo symbols from gkthebes.
woot woot. lets land this.
"this" the magic patch that's not here? :)  I threw away my first thebes conversion because it was done before the recent canvas work for 1.8/1.9; I have to redo it again.  Canvas is ok as-is right now, but it's something I want to do for 1.9.
Priority: -- → P2
Attached patch ver 0.1 (obsolete) — Splinter Review
Rough initial patch, getting rid of all direct cairo calls as possible, as well as cleaning up a few functions here and there. There are still some cairo calls left in due to lack of thebes support. In particular, there is no way to copy a path and restore and old path.

One neat thing this also fixes is the problem that canvas wasn't getting CMS since the calls didn't go through thebes.
Assignee: vladimir → ebutler
Status: NEW → ASSIGNED
Depends on: 445616
Attached patch ver 0.2Splinter Review
Improved patch; now all Cairo calls are removed from Canvas.
Attachment #329914 - Attachment is obsolete: true
Comment on attachment 330297 [details] [diff] [review]
ver 0.2

This looks fine, just a few nits:

11:48 < vlad> ebutler: in nsCanvasPattern, get rid of the mData member
11:49 < vlad> ebutler: for enum Style, uncomment STYLE_MAX and get rid of the VC6 sucks #define -- we're not building with VC6 any more

There are two places where you check !mSurface.get() -- just check !mSurface.

In your DrawRect function, add spaces around the == used in the condition.

In the "XXX cairo bug workaround", there's a method on mThebes that does that same thing; should use it instead -- mThebes->UpdateSurfaceClip();

Looks great otherwise!
Attachment #330297 - Flags: review+
Attached patch ver 1.0Splinter Review
Changed a few things:
fixed nits.
Changed functions that take a enum Style to actually take Style instead of PRInt32.
Replaced some of the NS_ADDREFs with forgets.
Attachment #330872 - Flags: review?(vladimir)
Comment on attachment 330872 [details] [diff] [review]
ver 1.0

Looks good, thanks!
Attachment #330872 - Flags: review?(vladimir) → review+
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/4e627e64d650
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: