Commit Graph

33 Commits

Author SHA1 Message Date
Michael Wu
0fe7772ece Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
Robert O'Callahan
f42618fdd2 Bug 649924. Use image surfaces to implement canvases beyond the texture size limit. r=bas 2011-07-08 22:42:21 +12:00
Bas Schouten
b8314e431a Bug 651858 - Part 6: Add the azure nsCanvasRenderingContext2D implementation. r=roc 2011-06-24 19:41:18 +02:00
Robert O'Callahan
8ea3739c3b Bug 622072. Part 3: Support empty transactions for canvas layers. r=tnikkel
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context,
using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean.

The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This
ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed),
so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer
won't be destroyed until the next paint of the window).

This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame.
We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated
called on them in BuildLayer when created.
2011-03-28 12:59:47 +13:00
Ehsan Akhgari
19025a6612 Back out bug 622072 because it caused bug 645987 2011-03-29 14:31:53 -04:00
Robert O'Callahan
9e0875a296 Bug 622072. Part 3: Support empty transactions for canvas layers. r=tnikkel
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context,
using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean.

The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This
ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed),
so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer
won't be destroyed until the next paint of the window).

This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame.
We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated
called on them in BuildLayer when created.
2011-03-28 12:59:47 +13:00
Vladimir Vukicevic
895126cd03 b=539771; Add support for context attribs to canvas; r=jmuizelaar 2010-11-16 20:33:03 -08:00
Chris Jones
a67f8a616f Bug 606279, part 1: Excise shmem-backed canvas. r=joe sr=vlad 2010-10-26 17:20:53 -05:00
Jim Mathies
a146ee2e18 Bug 559613 - Reuse the rendering context for tab previews and drop the cache time to 5 seconds. r=robarnold,jimm sr=vlad
a=blocking2.0
2010-08-19 08:22:46 -07:00
Robert O'Callahan
2b99a4f71b Bug 564991. Part 2: Create retained layer API: methods on FrameLayerBuilder that frames can use to access, reuse and invalidate retained layers. r=mats,sr=vlad 2010-07-16 09:07:46 +12:00
Oleg Romashin
ac784ef5d1 Bug 568632 - rename MozGetShmemContent to MozGetAsyncContext. r=joe 2010-06-08 13:27:24 -04:00
Oleg Romashin
8e31bb111e Bug 548437 - Implement a SysV shared memory backend for Shmem and allow them to be used with Xshm. r=joe,sr=vladimir 2010-06-04 09:58:22 -04:00
Olli Pettay
e1686ed450 m-c to e10 merge 2010-05-24 17:45:59 +03:00
Vladimir Vukicevic
f105732465 b=561168; convert canvas to use layers for rendering; r=roc,bas 2010-05-17 21:04:22 -07:00
Joe Drew
a670880255 Bug 524180 - Implement async drawWindow/Element() using shared memory. r=cjones 2010-03-24 03:47:18 -07:00
Joe Drew
64d7dc9d85 Bug 505847 - Implement asyncDrawXULElement in 2D canvas. r=bz,bsmedberg 2009-10-29 13:58:31 -04:00
Joe Drew
49dd860590 Back out asyncDrawXULElement, since WebGL isn't ready to be compiled with -DUNICODE. 2009-10-28 18:51:59 -04:00
Joe Drew
d4e629d26b Bug 505847 - Implement asyncDrawXULElement in 2D canvas. r=bz,bsmedberg 2009-10-28 16:55:49 -04:00
Benjamin Smedberg
18e450f391 Electrolysis-plugin-only bookkeeping commit. 2009-12-15 20:33:05 -05:00
Takanori MATSUURA
d42b7fba9b Bug 508923 - ‘nsIDocShell’ has not been declared in nsICanvasRenderingContextInternal.h. r=robarnold 2009-08-09 22:29:56 +02:00
Rob Arnold
4522731862 Bug 502715 - Enable the canvas 2d context to function without an actual canvas element r=vladimir 2009-08-04 14:36:02 -07:00
Robert Longson
a9b9f625d1 Bug 486936 - image-rendering style should apply to canvas element. r=vladimir 2009-06-17 21:31:18 +01:00
Vladimir Vukicevic
29c04311a7 b=430906; add moz-opaque attribute to <canvas>; r+sr=roc 2008-06-03 17:00:32 -07:00
0aec802cc9 b=430873; fast path drawImage with a canvas as source ; r+sr=roc/stuart; a=damon 2008-04-30 10:04:46 -07:00
f16c7cae66 back out bug 430873 to fix test failures 2008-04-29 07:43:35 -07:00
1fd22e22d4 b=430873; avoid copy when doing canvas-canvas drawImage ops ; r+sr=roc,a=damon 2008-04-28 20:49:50 -07:00
0e0181065e b=396972, clean up canvas API to avoid using internal API in contexts, r/a=stuart 2007-09-25 13:46:08 -07:00
vladimir@pobox.com
c86a1d9f1a b=333177, update canvas internal interfaces, optimize canvas, and fix some implementation bugs; r=stuart 2006-04-18 21:23:15 +00:00
bsmedberg@covad.net
fb56b42204 Bug 313309 part 2 - change the NS_DEFINE_STATIC_IID_ACCESSOR macro to NS_DECLARE, and make a NS_DEFINE_ macro that's outside the class declaration, r=shaver 2005-11-11 14:36:26 +00:00
pavlov@pavlov.net
d69126e1cc adding support for toDataURL and toDataURLAs on canvas. bug 245684. patches from Brett Wilson <brettw@gmail.com>. r=me, sr=vlad 2005-08-31 22:16:51 +00:00
vladimir@pobox.com
dc7df5eaa2 b=293267, fix canvas rendering speed, r+sr=bz,a=shaver 2005-05-12 21:34:56 +00:00
vladimir@pobox.com
7a1944716c b=293407, canvas uses wrong frame type; 293306, canvas leaks memory; 293225, default canvas height should be 150, r+sr=bzbarsky,a=shaver 2005-05-10 00:28:30 +00:00
vladimir@pobox.com
aca0ebc12a b=288714, html canvas implementation, r=various,a=brendan 2005-04-18 06:33:23 +00:00