Bug 14129 - [CAIRO] Support the canvas element
Summary: [CAIRO] Support the canvas element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Alp Toker
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-06-13 16:21 PDT by Alp Toker
Modified: 2007-10-03 10:35 PDT (History)
0 users

See Also:


Attachments
Initial work on Cairo canvas support (9.17 KB, patch)
2007-09-11 09:52 PDT, Alp Toker
no flags Details | Formatted Diff | Diff
Cairo canvas support (9.97 KB, patch)
2007-09-11 13:56 PDT, Alp Toker
no flags Details | Formatted Diff | Diff
Cairo canvas support (14.25 KB, patch)
2007-10-03 01:54 PDT, Alp Toker
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alp Toker 2007-06-13 16:21:50 PDT
A brief look at CanvasRenderingContext2D suggests this can be done in a couple of steps. First we need to add basic Cairo fill/stroke and possibly image support. Gradient support will require some abstraction and further work (for which #13312 may provide inspiration).

It seems that unlike most of the WebKit porting layer, CanvasRenderingContext2D porting is simply done with inline conditional macros.
Comment 1 Alp Toker 2007-09-11 09:52:47 PDT
Created attachment 16258 [details]
Initial work on Cairo canvas support

This is not particularly complete, but eg. canvas painter mostly works (http://caimansys.com/painter/).

Thoughts and improvements welcome.
Comment 2 Alp Toker 2007-09-11 13:56:22 PDT
Created attachment 16261 [details]
Cairo canvas support

Now renders canvas content in the correct position.
Memory leak fixed.
Comment 3 Alp Toker 2007-10-03 01:54:20 PDT
Created attachment 16514 [details]
Cairo canvas support

Not complete, but works quite well. There are a few FIXMEs and CanvasPattern is not yet implemented, but it may make sense to get this landed soon so the patch doesn't become obsolete every time the QT port is tweaked.

(No ChangeLog entry just yet)
Comment 4 Eric Seidel (no email) 2007-10-03 09:46:34 PDT
Comment on attachment 16514 [details]
Cairo canvas support

Ick.  The code looks fine.  The only problem is see is that this makes Canvas code even uglier (as now there is a 3-way ifdef.  Canvas needs to be taught to use platform dependent support classes, and the platform independent bits should then have all the #ifdef'd code removed.

I mentioned some needless comments on IRC.  Please remove those, then feel free to land.
Comment 5 Alp Toker 2007-10-03 10:35:34 PDT
Fixed in r26021