Commit graph

295 commits

Author SHA1 Message Date
Imanol Fernandez
703962fe61 Improve WebGL architecture. 2017-08-15 22:14:32 +02:00
Paul Rouget
d241389129 make use of ScriptToConstellationChan 2017-08-15 08:22:09 +02:00
Alan Jeffrey
2318caf002 Implement drawing an image from a CSS style value into a canvas. 2017-07-21 16:39:11 -05:00
Alan Jeffrey
328fb25a65 Implemented paint worklet rendering context. 2017-06-30 16:41:08 -05:00
Simon Sapin
7af5a7fd54 Untry script 2017-06-18 13:21:49 +02:00
Glenn Watson
e7b1e041c8 Update WR (CPU text optimizations, image format renames). 2017-06-16 15:27:22 +10:00
Nicolas Silva
8617320500 Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
SendilKumar N
5acee23f5d Use the origin of the actual image response when determining if a canvas is origin clean. 2017-05-19 09:38:50 -04:00
n0max
49820a6797 Remove IndexSizeError in CanvasRenderingContext2D::drawImage 2017-04-29 19:27:00 +02:00
Fernando Jiménez Moreno
72d7ee613b Make image cache per-document rather than global 2017-03-27 19:54:13 +02:00
Lucjan Suski
c83ac31e71 Make ImageData::new return Fallible instead of panic 2017-03-20 21:16:55 +01:00
lucantrop
d6568e608b removed instances of -> () in existing code 2017-03-13 17:38:33 +01:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Josh Matthews
c890c9143c Make script thread initiate requests for images needed by layout.
In support of this goal, the layout thread collects information about
CSS images that are missing image data and hands it off to the script
thread after layout completes. The script thread stores a list of
nodes that will need to be reflowed after the associated network
request is complete. The script thread ensures that the nodes are
not GCed while a request is ongoing, which the layout thread is
incapable of guaranteeing.

The image cache's API has also been redesigned in support of this
work. No network requests are made by the new image cache, since it
does not possess the document-specific information necessary to
initiate them. Instead, there is now a single, synchronous
query operation that optionally reserves a slot when a cache
entry for a URL cannot be found. This reserved slot is then
the responsibility of the queryer to populate with the contents
of the network response for the URL once it is complete. Any
subsequent queries for the same URL will be informed that the
response is pending until that occurs.

The changes to layout also remove the synchronous image loading
code path, which means that reftests now test the same code
that non-test binaries execute. The decision to take a screenshot
now considers whether there are any outstanding image
requests for layout in order to avoid intermittent failures in
reftests that use CSS images.
2017-02-22 14:19:35 -05:00
Emilio Cobos Álvarez
0c102e2350
style: Unbox a bunch of color properties.
This builds on https://github.com/servo/rust-cssparser/pull/118.
2017-02-14 20:18:31 +01:00
Prudhvi Rampey
e3d8131698 Error handled canvas closing 2016-12-28 23:14:46 +05:30
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Glenn Watson
acfdfd2fa9 Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
2016-10-18 10:21:27 +10:00
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02:00
Anthony Ramine
d8e92bb271 Rename Reflectable::global_scope to global 2016-10-06 21:36:41 +02:00
Anthony Ramine
a8c05c6962 Make CanvasRenderingContext2d::new take a &GlobalScope 2016-10-06 21:35:39 +02:00
Anthony Ramine
ae6af5172b Introduce Reflectable::global_scope 2016-10-06 21:35:38 +02:00
Anthony Ramine
f789e73fd2 Introduce GlobalScope::constellation_chan 2016-10-06 20:59:12 +02:00
Anthony Ramine
fcb59d3057 Make reflect_dom_object take a &GlobalScope 2016-10-06 20:59:09 +02:00
Arthur Marble
dbec9d8454 More code refactoring (exampleVar to example_var) 2016-09-18 01:02:57 -05:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Anthony Ramine
2400b91d05 Don't bother with the global in ImageData::get_image_data 2016-08-30 19:06:41 +02:00
Glenn Watson
119716acb2 Fix canvas image tests when using webrender.
When webrender is enabled, image decoding doesn't pre-multiply by
alpha, but the canvas code expects the image data to be
pre-multiplied form.
2016-08-30 09:57:38 +10:00
Anthony Ramine
51768844ed Update euclid to 0.10.1 2016-08-21 03:03:45 +02:00
Anthony Ramine
e77efb93c1 Move util::vec::byte_swap to canvas_traits 2016-07-04 16:48:15 +02:00
Anthony Ramine
f8c3fe1076 Make canvas send their data themselves to other canvas 2016-06-16 18:24:04 +01:00
Anthony Ramine
b45f1918d1 Remove JS::from_rooted 2016-05-31 14:43:58 +02:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
2016-05-19 17:13:44 +02:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
David Raifaizen
b5159dc7ff Setting current color to black if canvas is not rendered in document 2016-04-22 09:59:49 -04:00
Ms2ger
03d4bacc05 Use num-traits in script. 2016-04-20 15:23:43 +02:00
Di Xu
76f57efb58 replace Fallible<()> with ErrorResult 2016-04-13 19:56:52 +08:00
Ms2ger
63a00f4dbf Stop sending the renderer id to script. 2016-03-21 17:55:08 +01:00
Ms2ger
7e2e54326f Remove renderer_id fields. 2016-03-21 17:49:47 +01:00
Ms2ger
3c04bca0f4 Remove get_renderer_id functions. 2016-03-21 17:45:42 +01:00
Saurav Sachidanand
939560bd6e Update some canvas properties as enums instead of DOMString 2016-02-19 22:19:09 +05:30
Alexander Lopatin
2be49404be Fix #9508: Beautify our union enums constructors 2016-02-07 02:55:21 +03:00
jmr0
167ffa7a95 adding image metadata notification capabilities to image cache 2016-01-29 20:54:49 -05:00
Kishor Bhat
1ca2073979 Remove unused imports in script 2016-01-17 12:41:28 +05:30
Chad Kimes
ce6075825d Add global default method for Reflectable trait 2016-01-11 20:23:47 -05:00
Chad Kimes
d90141a8f6 Remove global field from CanvasRenderingContext2D 2016-01-10 21:53:18 -05:00