servo/components/layout
Yati Sagade aa48a2c2e3 Paint worklets: Implement timeout for worklet painter threads
When a paint worklet thread takes too long, we would like to move on,
since we have a ~16ms budget for rendering @60fps. At the moment, there
is no provision in the paintworklet spec to signal such timeouts to the
developer. ajeffrey opened an [issue][1] for this, but it got punted to
v2 of the spec. Hence we are silently timing out unresponsive paint
scripts.

The timeout value is chosen to be 10ms by default, and can be overridden
by setting the `dom.worklet.timeout_ms` pref.

In the absence of such a timeout, the reftest in this commit would fail
by timing out the testrunner itself, since the paint script never
returns. From my discussions with ajeffrey, this should do until we spec
out a way to signal timeouts to the script developer.

Since we did not have a better way to trigger a timeout than a busy
waiting loop (which would hog one core of the test machine until the
timeout was reached), we decided to implement a test only blocking
sleep, available to the PaintWorkletGlobalScope. Since
`dom.worklet.enabled` enables worklets in general, we also decided to
have another pref `dom.worklet.blockingsleep.enabled`, which, in
addition to `dom.worklet.enabled`, would be required for the blocking
sleep to be available.

This fixes #17370.

[1]: https://github.com/w3c/css-houdini-drafts/issues/507
2017-12-22 10:47:23 +01:00
..
animation.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
block.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
Cargo.toml layout: background-origin attribute for gradients 2017-12-15 22:16:58 +01:00
construct.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
context.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
data.rs Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
display_list_builder.rs Paint worklets: Implement timeout for worklet painter threads 2017-12-22 10:47:23 +01:00
flex.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
floats.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
flow.rs style: Move text-align outside of the mako file. 2017-12-18 11:58:06 -06:00
flow_list.rs Remove usage of unstable feature conservative_impl_trait in layout 2017-10-13 11:11:06 +02:00
flow_ref.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
fragment.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
generated_content.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
incremental.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
inline.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
layout_debug.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
lib.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs style: Make all keywords CamelCase for consistency. 2017-12-06 02:35:10 +01:00
model.rs Update WR to use the new sticky positioning API 2017-10-30 10:15:30 +01:00
multicol.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
persistent_list.rs Use try syntax for Option where appropriate 2017-10-20 08:25:35 -07:00
query.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
sequential.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
table.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
table_caption.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_cell.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
table_colgroup.rs Wait as late as possible to assign ClipIds 2017-10-24 16:28:07 +02:00
table_row.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
table_rowgroup.rs Remove border_collapse field in InternalTable 2017-12-08 04:51:58 -08:00
table_wrapper.rs style: Make all keywords CamelCase for consistency. 2017-12-06 02:35:10 +01:00
text.rs style: Make all keywords CamelCase for consistency. 2017-12-06 02:35:10 +01:00
traversal.rs Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
webrender_helpers.rs layout: support tiled gradients 2017-12-14 09:25:30 +01:00
wrapper.rs layout: Fixup indentation of ThreadSafeLayoutNodeHelpers::flags. 2017-11-10 13:13:19 +01:00